Skip to main content

createRootLogger()

Home > @backstage/backend-common > createRootLogger

Creates a default "root" logger. This also calls setRootLogger() under the hood.

Signature:

function createRootLogger(options?: winston.LoggerOptions, env?: NodeJS.ProcessEnv): winston.Logger;

Parameters

ParameterTypeDescription
optionswinston.LoggerOptions(Optional)
envNodeJS.ProcessEnv(Optional)

Returns:

winston.Logger

Remarks

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