Check if intended log level is allowed in environment log level
Prefix for cyan color
Return log level from environment
Prefix for green color
Set to true if this code is executed by Node.js
Set to true if the environment for a productive environment is given
In Node.js this means that NODE_ENV
is set to production
Log levels
Prefix for red color
Suffix to end a color
Stringify a list of arguments
Transport for errors
For example @stapps/smtp-transport
Prefix for white color
Prefix for yellow color
Log with level ERROR
Arguments to log
Log with level INFO
Arguments to log
Log with level LOG
Arguments to log
Log with level OK
Arguments to log
Log with level WARN
Arguments to log
Checks if this code is executed in Node.js
Checks if a productive environment is given
Generated using TypeDoc
Logger with colors, loglevel and transport
Log level can be defined by setting the environment variable STAPPS_LOG_LEVEL to a valid log level. Log levels are set in a binary way. For example STAPPS_LOG_LEVEL=12 does result in logs only for
Logger.warn
andLogger.error
.Log levels in that order are:
1 - INFO 2 - LOG 4 - WARN 8 - ERROR 16 - OK