1.1.0 • Published 3 years ago

@isauadh/loggingtool v1.1.0

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

loggingtool

A simple logging tool with hierarchies built-in.

log level

  • DEBUG: includes (DEBUG, INFO, ERROR)
  • INFO: includes (INFO, ERROR)
  • ERROR: includes (ERROR)

Installation

$ npm install @isauadh/loggingtool

Documentation

Start logging

Usage:

var LoggingTool = require('@isauadh/loggingtool');
var logger = new LoggingTool.LogLevel(`DEBUG`, `MyFunction`);
logger.debug(`This is a debug message.`);
// console.log [2021-02-07T18:31:46.358Z]  [DEBUG] [MyFunction]    This is a debug message.

Features

  • Easy to use with no dependencies
  • By default, Timestamp, LogLevel, & FunctionName are logged.
  • Turn Timestamp, LogLevel, & FunctionName logging on/off as follows:
logger.displayTheTimestamp(false);
logger.displayTheLogLevel(false);
logger.displayTheFuncName(false);

License

See the LICENSE file.

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago