@tshio/logger
v1.0.5
Published
Logger
Downloads
407
Readme
Logger
Logger library for Node.js.
This is a 100% JavaScript library, with TypeScript definition, with the Promise API.
Installing
$ npm install @tshio/logger
or
yarn add @tshio/logger
Usage
// CommonJS
const { createLogger } = require('@tshio/logger');
// ES Module
import { createLogger } from '@tshio/logger';
const logger = createLogger();
const obfuscateLogger = createLogger(["secure"]);
const objectToLog = {
key1: "value",
secure: "secure data" // hide data
}
obfuscateLogger.info(objectToLog);
logger.info("Example info");
somePromise.catch((e) => logger.debug("Some error", e));
License
This project is licensed under the terms of the MIT license.
About us:
The Software House