LogLevelConverter

Helper class used to convert log level values.

Description

The LogLevelConverter class is used to convert log level values.

Methods

logLevelFromString

Converts log level to a LogLevel.

logLevelFromString(value any) LevelType

  • value: any - a log level string to convert.
  • returns: LevelType - log level value.

logLevelToString

Converts log level to a string.

logLevelToString(level LevelType) string

  • level: LevelType - log level to convert.
  • returns: string - log level name string.

ToLogLevel

Converts numbers and strings to standard log level values.

(c *TLogLevelConverter) ToLogLevel(value any) LevelType

  • value: any - value to be converted
  • returns: LevelType - converted log level

ToString

Converts a log level to a string.

(c *TLogLevelConverter) ToString(level LevelType) string

  • level: LevelType - log level to convert
  • returns: string - log level name string.

See also