Configurable BE-only logger.
Backend-only logger for Node.js packages based on Winston logger.
Import createLogger function to create a logger instance.
Logger configuration allows specifying log format, styling and level.
Enables or disables logging. Options:
true- Enables logging.false- Disables logging.
json- Specifies JSON log format. This is suitable when running in production and streaming logs to other services.pretty- Logs are formatted in a human-friendly "pretty" way. Ideal, when running the service locally and in development.
Enables or disables colors in the log output. Options:
true- Enables colors in the log output. The output has special color setting characters that are parseable by CLI. Recommended when running locally and in development.false- Disables colors in the log output. Recommended for production.
Defines the minimum level of logs. Logs with smaller level (severity) will be silenced. Options:
debug- Enables all logs.info- Enables logs with levelinfo,warnanderror.warn- Enables logs with levelwarnanderror.error- Enables logs with levelerror.