pre defined and formated error log configuration for Winston 3
npm install @strg/logging-winston


``bash`
npm install winston @strg/logging-winston
javascript
import {logger} from '@strg/logging-winston'logger.info(
${'hello world'})`
$3
For all errors with a parent "cause", messages and stacktrace will be displayed hierarchically.
`javascript
const error = new Error('Child Error', { cause: new Error('Parent Error')})
logger.error(error) // will display stacktrace and original message for child and parent errors
`$3
| | Description | Default |
|:---|:------------|:--------|
| NODE_LOG_FORMAT | _
SIMPLE_, _JSON_ | JSON |
| NODE_LOG_LEVEL | _fatal_, _error_, _warn_, _info_, _trace_, _debug_ | info |
| NODE_LOG_STACK_KEY | the key of the stacktrace (require NODE_LOG_FORMAT=JSON) | stack_trace |
Specification
This library aims to standarize the logging output in all node or typescript based applications.
Development
$3
#TBD$3
#TBD`We use SemVer for versioning. For the versions available, see the tags on this repository.