Package that provides a common logger
npm install @plmtest/cosmos-loggerThis package provides a consistent logging implementation for all PLM Fleet services (and packages).
``js
const { createLogger } = require('@plmtest/cosmos-logger')
const config = {
name: 'my-logger',
level: 'info'
}
const logger = createLogger(config)
`
Various options for the logger can be configured.
By default, the following configuration is used:
`js``
const config = {
name: 'N/A',
level: LOG_LEVELS.INFO,
src: true,
mode: LOG_MODES.DEFAULT, // DEFAULT, SIMPLE, SHORT, LONG, JSON, INSPECT
color: true,
jsonIndent: 2
}