0.1.1 • Published 6 years ago

@roosoft/logger v0.1.1

Weekly downloads
16
License
ISC
Repository
-
Last release
6 years ago

logger

Manage application execution information

Environment variables

LOG_LEVELValues
Availabletrace, debug, info, warn, error
Defaultinfo
LOG_FORMATValues
Availableraw, json, console
Defaultconsole
LOG_DATE_FORMATValues
Availablesee moment.js formats
DefaultYYYY-MM-DD
LOG_TIME_FORMATValues
Availablesee moment.js formats
DefaultH:mm:ss.SSS

How to use

Setup environment log level and format environment variables in your application. When logging from files, first require this library.

const log = require('logger')

Then log in a similar way you would use console.log, except using one of these:

  • log.trace
  • log.debug
  • log.info
  • log.warn
  • log.error
Example
log.info('what is happening right now')
0.1.1

6 years ago

0.1.0

6 years ago