@doubco/logbook
v1.0.7
Published
Simple logger library for JS.
Downloads
52
Maintainers
Readme
LogBook 📕
Install
npm install @doubco/log-book --save
or yarn add @doubco/log-book
Setup
import { LogBook } from "@doubco/log-book";
export default new LogBook({
options: {
colorize: !process.env.NO_COLOR,
visible: process.env.NODE_ENV == "development" || process.env.SHOW_LOGS,
browser: process.browser
},
hook: (key, ...rest) => {
// you can use hook to push log to a service.
}
});
Usage
import log from "./my-logger";
log.info("APP", "Hello World.").
log.error("APP", "Hello World.").
log.warning("APP", "Hello World.").
log.success("APP", "Hello World.").
log.black("APP", "Hello World.").
log.blue("APP", "Hello World.").
log.cyan("APP", "Hello World.").
log.magenta("APP", "Hello World.").
Contribute
Pull requests are welcome and please submit bugs 🐛.
Contact
- Follow @doubco on Twitter
- Follow @doubco on Facebook
- Follow @doubco on Instagram
- Email mailto:[email protected]