LogLevelConverter

Helper class used to convert log level values.

Description

The LogLevelConverter class is used to convert log level values.

Static methods

to_integer

Converts log level to a number.

static to_integer(level: LogLevel): int

  • level: LogLevel - a log level to convert.
  • returns: int - log level number value.

to_log_level

Converts numbers and strings to standard log level values.

static to_log_level(value: Any, default_value: LogLevel = LogLevel.Info): LogLevel

  • value: Any - a value to be converted
  • default_value: LogLevel - a default value if conversion is not possible
  • returns: LogLevel - converted log level

to_string

Converts log level to a string.

static to_string(level: LogLevel): str

  • level: LogLevel - a log level to convert
  • returns: str - log level name string.

See also