imergo-logger
v9.0.2
Published
Generic winston logger wrapper for our imergo-frameworks.
Downloads
76
Readme
imergo-logger
This module is a generic winston logger wrapper for our imergo-frameworks. It is a globally configurable logger via environment variables, with default values.
Install
npm install imergo-loggerUsage
import Logger from "imergo-logger"
const logger = Logger(label | config)
logger.error("This is an error message")Where:
label: standard descriptive stringconfig: standard winston configuration object
Environment variables
| Variable | Description | Default |
|:-------------------------|:---------------------------------------------------------------------------|----------------------------------------------------------------------|
| NODE_DEBUG | Comma-separated list of module names to be debugged (it accepts wildcards) | None |
| NODE_IMERGO_LOGCONSOLE | When false, it deactivates shell logging | true |
| NODE_IMERGO_LOGDIR | Directory where to store logs | $HOME/.logs in POSIX systems or %USERPROFILE%\.logs in Windows |
| NODE_IMERGO_LOGFILE | Name of the log file | imergo.log |
Testing
npm testDocumentation
To install the documentation locally, run:
npm run docAvailable online at: https://health-open.pages.fraunhofer.de/imergo-logger/
