Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LogLevelCliContribution

Parses command line switches related to log levels, then watches the log levels file (if specified) for changes. This is the source of truth for what the log level per logger should be.

Hierarchy

  • LogLevelCliContribution

Implements

Index

Properties

Protected _defaultLogLevel

_defaultLogLevel: LogLevel = LogLevel.INFO

Log level to use for loggers not specified in logLevels.

Protected _logLevels

_logLevels: LogLevels

Protected logConfigChangedEvent

logConfigChangedEvent: Emitter<void> = new Emitter<void>()

Accessors

defaultLogLevel

logLevels

onLogConfigChanged

  • get onLogConfigChanged(): Event<void>

Methods

configure

  • configure(conf: Argv): void

logLevelFor

  • logLevelFor(loggerName: string): LogLevel

Protected readLogLevelString

  • readLogLevelString(levelStr: string, errMessagePrefix: string): LogLevel

setArguments

  • setArguments(args: yargs.Arguments): Promise<void>

Protected slurpLogConfigFile

  • slurpLogConfigFile(filename: string): Promise<void>

Protected watchLogConfigFile

  • watchLogConfigFile(filename: string): Promise<void>