Creates the LoggerPlugin.
The plugin depends on the runtime plugin (CAPABILITIES.RUNTIME) and registers its ILogger under CAPABILITIES.LOGGER at PLUGIN_PRIORITY.HIGH so logging is available before most other plugins register.
CAPABILITIES.RUNTIME
ILogger
CAPABILITIES.LOGGER
PLUGIN_PRIORITY.HIGH
Optional
Plugin configuration
The plugin instance
import { LoggerPlugin } from '@setu-ts/logger-plugin';app.register(LoggerPlugin({ level: 'debug', transport: 'console', pretty: true, redact: ['password', 'token'], requestLogging: true, slowRequestThreshold: 1000,})); Copy
import { LoggerPlugin } from '@setu-ts/logger-plugin';app.register(LoggerPlugin({ level: 'debug', transport: 'console', pretty: true, redact: ['password', 'token'], requestLogging: true, slowRequestThreshold: 1000,}));
LoggerConfigurationError when logger and transport do not agree
LoggerConfigurationError
0.1.0
Creates the LoggerPlugin.
The plugin depends on the runtime plugin (
CAPABILITIES.RUNTIME) and registers itsILoggerunderCAPABILITIES.LOGGERatPLUGIN_PRIORITY.HIGHso logging is available before most other plugins register.