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.
public static
toInteger(level: LogLevel): number
- level: LogLevel - a log level to convert.
- returns: number - log level number value.
toLogLevel
Converts numbers and strings to standard log level values.
public static
toLogLevel(value: any, defaultValue: LogLevel = LogLevel.Info): LogLevel
- value: any - a value to be converted
- defaultValue: LogLevel - a default value if conversion is not possible
- returns: LogLevel - converted log level
toString
Converts log level to a string.
public static
toString(level: LogLevel): string
- level: LogLevel - a log level to convert
- returns: string - log level name string.