@tshio/logger

Logger

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@tshio/logger
921.0.57 months ago2 years agoMinified + gzip package size for @tshio/logger in KB

Readme

Logger
npm version
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

license
This project is licensed under the terms of the MIT license.

About us:

The Software House
tsh.png