@kacao/chops
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

chops

Simple JSON logger

import {withFields, debug, info, warn, error, log} from "@kacao/chops";

log("chops");     // {msg: "chops", "level": "info"}
debug("chops");   // {msg: "chops", "level": "debug"}

// with timestamp
withFields({
  "time": () => { return new Date().toString(); }
})
.log("chops");

// custom log level
log("chops", "test");

// custom logger
let logger = new Logger({
  "test": "test"
});
logger.debug("chops");

Readme

Keywords

Package Sidebar

Install

npm i @kacao/chops

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

21.1 kB

Total Files

8

Last publish

Collaborators

  • kacao