Skip to content
/ logger Public

A Winston logger which logs to JSON with ordered keys and error stack support.

License

Notifications You must be signed in to change notification settings

artcom/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger

A Winston logger which logs to JSON with ordered keys and error stack support.

Usage

Install this library via npm:

npm install @artcom/logger

Use as follows:

const { createLogger } = require("@artcom/logger");
const logger = createLogger();

logger.info("Hello world!");

Additional options are supported:

  • transports: is the array of transports managed by Winston
  • keyOrder is the array specifying the order of message keys (e.g. ["timestamp", "level", "message"]), additional keys are placed after these keys by insertion order

About

A Winston logger which logs to JSON with ordered keys and error stack support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published