mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
parent
c40d01a0ea
commit
b964c0d488
1 changed files with 3 additions and 1 deletions
|
@ -122,7 +122,9 @@ export function setup(options: LoggerConfig | LoggerConfigItem = [DEFAULT_LOGGER
|
||||||
const pinoConfig = { level: loggerConfig.level };
|
const pinoConfig = { level: loggerConfig.level };
|
||||||
if (loggerConfig.type === 'file') {
|
if (loggerConfig.type === 'file') {
|
||||||
debug('logging file enabled');
|
debug('logging file enabled');
|
||||||
logger = createLogger(pinoConfig, pino.destination(loggerConfig.path), loggerConfig.format);
|
const destination = pino.destination(loggerConfig.path);
|
||||||
|
process.on('SIGUSR2', () => destination.reopen());
|
||||||
|
logger = createLogger(pinoConfig, destination, loggerConfig.format);
|
||||||
} else if (loggerConfig.type === 'rotating-file') {
|
} else if (loggerConfig.type === 'rotating-file') {
|
||||||
process.emitWarning('rotating-file type is not longer supported, consider use [logrotate] instead');
|
process.emitWarning('rotating-file type is not longer supported, consider use [logrotate] instead');
|
||||||
debug('logging stdout enabled');
|
debug('logging stdout enabled');
|
||||||
|
|
Loading…
Reference in a new issue