BlueCollar.Examples.Webpages._Default.CssClassForLogLevel C# (CSharp) Method

CssClassForLogLevel() public static method

Gets the CSS class to use for the given log level text.
public static CssClassForLogLevel ( string level ) : string
level string The log level text to get the CSS class for.
return string
        public static string CssClassForLogLevel(string level)
        {
            level = (level ?? string.Empty).Trim().ToUpperInvariant();

            switch (level)
            {
                case "INFO":
                    return "label label-info";
                case "WARN":
                    return "label label-warning";
                case "ERROR":
                    return "label label-important";
                default:
                    return "label";
            }
        }