Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LoggerFactory

The source and single point of management for Logger instances.

Hierarchy

  • LoggerFactory

Index

Properties

Static DEFAULT_LOGGER

DEFAULT_LOGGER: string = "DEFAULT"

The name of the default Logger.

readonly

Static DEFAULT_LOGGING_LEVEL

DEFAULT_LOGGING_LEVEL: string = "ERROR"

The Level used if a default is not found under the LOGGING_LEVEL key in Config.

readonly

Static ENV_LOGGING_LEVEL

ENV_LOGGING_LEVEL: string = "LOGGING_LEVEL"

The key in Config that will be checked for a default logging level.

readonly

Static ENV_LOGGING_LEVEL_PREFIX

ENV_LOGGING_LEVEL_PREFIX: string = LoggerFactory.ENV_LOGGING_LEVEL + '_'

The prefix for the key in Config that will be used to determine the logging level for Logger instances with the name following the prefix.

readonly

Static GLOBAL_APPENDER

GLOBAL_APPENDER: Appender = new ConsoleAppender()

The Appender used by all Logger instances that do not have one specified.

Static GLOBAL_LEVEL

GLOBAL_LEVEL: Level

The Level used by all Logger instances that do not have one specified.

Methods

Static getLogger

  • getLogger(loggerName?: string): Logger
  • Returns the Logger instance with the specified name. If no name is provided, the default will be returned. If a logger does not exist with the specified name, a new one will be created.

    Parameters

    • Default value loggerName: string = this.DEFAULT_LOGGER

      Name of the logger instance to be returned.

    Returns Logger

Static logEnabledLevels

  • logEnabledLevels(logger: Logger): void

Generated using TypeDoc