Skip to main content

Logger

Deprecated: logs

The property is log. The older logs spelling is still accepted but emits a deprecation warning (VERWAR002) on startup and may be removed at any time.

As with any web application, Verdaccio has a customizable built-in logger. You can define multiple types of outputs.

# console output
log: { type: stdout, format: pretty, level: http }

or file output.

# file output
log: { type: file, path: verdaccio.log, level: info }

Verdaccio 5 does not support rotation file anymore, here more details.

Use SIGUSR2 to notify the application, the log-file was rotated and it needs to reopen it. Note: Rotating log stream is not supported in cluster mode. See here

Sensitive data can be masked or removed using log redaction.

log:
type: stdout
format: pretty
level: http
redact:
paths:
[
'req.header.authorization',
'req.header.cookie',
'req.remoteAddress',
'req.remotePort',
'ip',
'remoteIP',
'user',
'msg',
]
censor: '<redacted>'

Configuration

PropertyTypeRequiredExampleSupportDescription
typestringNo[stdout, file]alldefine the output
pathstringNoverdaccio.logallif type is file, define the location of that file
formatstringNo[pretty, pretty-timestamped]alloutput format
levelstringNo[fatal, error, warn, info, http, debug, trace]allverbose level
colorsbooleanNofalsealldisable or enable colors
redactobjectNosee aboveredact sensitive data
syncbooleanNotrueturn on synchronous logging