https://github.com/maxdome/mxd-logging
Returns configured winston logger instances
https://github.com/maxdome/mxd-logging
Last synced: about 1 year ago
JSON representation
Returns configured winston logger instances
- Host: GitHub
- URL: https://github.com/maxdome/mxd-logging
- Owner: maxdome
- Created: 2016-06-15T11:34:19.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-05T11:23:53.000Z (over 9 years ago)
- Last Synced: 2025-02-17T16:45:13.645Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example
```
const logging = require('mxd-logging')(config);
const appLogger = logging('app');
```
# Config
## Environment Variables
If environment variables are set, the config object will be ignored!
* MXD_LOGGING_FILENAME: The path for the logfile
* MXD_LOGGING_LEVEL: The loglevel (optional, default: 'info')
## 'config' Object
For available types and their options, see: https://github.com/winstonjs/winston/blob/master/docs/transports.md
```
{
"logging": {
"transports": [
{
"type": "",
"options": {}
}
]
}
}
```