This is a very simple logging library that handles Node.JS or browser apps. Its use cases are rather limited and are currently documented in this repository's json.js and text.js files.
You can install this module via NPM
with npm install @jitsusama/logging-js
.
const logging = require("@jitsusama/logging-js");
const logger = logging.getLogger("some.name");
logger.info("hello %s", "world");
The usage above will default to simplified text output when imported by a website bundler, or as a JSON string when imported from a Node.JS application.
You can override the default output handling by specifically importing the type you wish:
const textLogging = require("@jitsusama/logging-js/lib/text.js");
const jsonLogging = require("@jitsusama/logging-js/lib/json.js");
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.