Skip to main content

setRootLogger()

Home > @backstage/backend-common > setRootLogger

Sets a completely custom default "root" logger.

Signature:

function setRootLogger(newLogger: winston.Logger): void;

Parameters

ParameterTypeDescription
newLoggerwinston.Logger

Returns:

void

Remarks

This is the logger instance that will be the foundation for all other logger instances passed to plugins etc, in a given backend.

Only use this if you absolutely need to make a completely custom logger. Normally if you want to make light adaptations to the default logger behavior, you would instead call createRootLogger().