sigma-logger

1.0.3 • Public • Published

Logger

Description

Easy to use logger for nodejs applications.

Takes a message and writes it to a datestamped log file mm-dd-yyyy-log.txt with a time stamp HH-MM-SS AM/PM.

Usage

// this is an ES6 module
import Logger from 'logger';
Logger.log('Hello World');

That is it! The log file will be created a logs directory that is created at the root of the project.

Options

Logger.omitConsole = true; // default: false
Logger.log('Hello World'); // will not log to console
logger.omitTime = true; // default: false
Logger.log('Hello World'); // will not put the time stamp in the log file.

This class uses static methods so you do not need to instantiate it.

This module is OS-agnostic and will work on Windows, Mac, and Linux.

Readme

Keywords

none

Package Sidebar

Install

npm i sigma-logger

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

4.18 kB

Total Files

4

Last publish

Collaborators

  • mwalkersigma