Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines a LogGroupRule, this allows you to either have everything configured the same way or for example loggers that start with name model. It allows you to group loggers together to have a certain loglevel and other settings. You can configure this when creating the LoggerFactory (which accepts multiple LogGroupRules).

Hierarchy

  • LogGroupRule

Index

Constructors

constructor

  • Create a LogGroupRule. Basically you define what logger name(s) match for this group, what level should be used what logger type (where to log) and what format to write in. If the loggerType is custom, then the callBackLogger must be supplied as callback function to return a custom logger.

    Parameters

    • regExp: RegExp

      Regular expression, what matches for your logger names for this group

    • level: LogLevel

      LogLevel

    • Default value logFormat: LogFormat = new LogFormat()

      LogFormat

    • Default value loggerType: LoggerType = LoggerType.Console

      Type of logger, if Custom, make sure to implement callBackLogger and pass in, this will be called so you can return your own logger.

    • Default value callBackLogger: function | null = null

      Callback function to return a new clean custom logger (yours!)

    Returns LogGroupRule

Accessors

callBackLogger

  • get callBackLogger(): function | null

level

logFormat

loggerType

regExp

  • get regExp(): RegExp

Generated using TypeDoc