Skip to content

LogLevelExtensions Class

Helper methods for log level handling.

C#
public static class LogLevelExtensions

Inheritance object

Gets the highest log level when there could potentially be multiple levels provided.

C#
public static LogLevel GetHighestLevel(this LogLevel levels)

levels LogLevel
The log level(s).

LogLevel
The highest log level supplied.

Returns a translation of a log level to it’s associated console colour.

C#
public static ConsoleColor GetConsoleColor(this LogLevel level)

level LogLevel
The log level(s).

ConsoleColor
A console color associated with the highest log level supplied.