public static Func <string, LogLevel, bool> GetFilter(this LogLevel level, string name) { if (string.IsNullOrEmpty(name)) { return(level.GetFilter()); } if ((uint)level <= (uint)LogLevel.Critical) { if (level == LogLevel.Trace) { return((n, l) => string.Equals(n, name, StringComparison.OrdinalIgnoreCase)); } return((n, l) => l >= level && string.Equals(n, name, StringComparison.OrdinalIgnoreCase)); } return(False); }