@kacao/chops
v0.0.3
Published
Simple JSON logger
Downloads
5
Readme
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");