@royportas/logging
v1.0.8
Published
A logging package
Downloads
4
Readme
Logging
A logging framework for browsers and node
How is this different from other logging frameworks?
This framework is designed with the following things in mind:
- Be as simple as possible
- Provide a simple way to log and group particular classes
- Be easy to turn off logs for particular classes
Design Principles
- Easy to use
- Works in the browser
Example
import { Logger, RootLogger } from "@royportas/logging";
const root = RootLogger();
class MyClass {
logger: Logger;
constructor() {
super();
this.logger = root.getLogger(this.constructor.name);
}
somethingHappened() {
this.logger.debug("A thing happened");
}
}
See the example
folder for more usage examples.
Deploying and publishing
The script yarn deploy
handles publishing new
versions to NPM and pushing the docs to Github pages