1.0.0-rc.11 • Published 3 years ago

@jitsusama/logging-js v1.0.0-rc.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@jitsusama/logging-js

last commit badge package.json version badge license badge vulnerabilities badge

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.

Installation

You can install this module via NPM with npm install @jitsusama/logging-js.

Usage

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");

Contributing

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.