Skip to content

mwalkersigma/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Zero Dependency Logger for node js

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •