LogLevelConverter

Helper class used to convert log level values.

Description

The LogLevelConverter class is used to convert log level values.

Static methods

toInteger

Converts log level to a number.

static int toInteger(LogLevel level)

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

toLogLevel

Converts numbers and strings to standard log level values.

static LogLevel toLogLevel(dynamic value, [LogLevel defaultValue = LogLevel.Info])

  • value: dynamic - value to be converted
  • defaultValue: LogLevel - default value if conversion is not possible
  • returns: LogLevel - converted log level

toString2

Converts log level to a string.

static String toString2(LogLevel level)

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

See also