@sealsystems/log v2.5.1
@sealsystems/log
@sealsystems/log is the logger for all Node.js modules by SEAL Systems.
All log messages will be written to stdout and can then be processed by 3rd-party tools.
Installation
npm install @sealsystems/logQuick start
First you need to integrate @sealsystems/log into your application.
const log = require('@sealsystems/log').getLogger();Logging
The following log levels are defined:
debug:
log.debug('This is a debug message.');info:
log.info('This is a info message.');warn:
log.warn('This is a warning message.');error:
log.error('This is a error message.');fatal:
log.fatal('This is a fatal error message.');Please note: This level will be used for logging an unhandled exception.
Uncaught exceptions/Unhandled rejections
Exceptions and rejections that are not caught otherwise are also logged with log level fatal. After logging the error, the process will be terminated with exit code 1. You have to require the log module at least one time in your project to enable this feature. No further configuration is required.
Environment Variable LOG_LEVEL
A single minimum log level which includes all higher levels.
LOG_LEVEL=warnThe setting above includes log levels warn, error and fatal.
10 months ago
9 months ago
2 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago