public static Func CreateConfigSectionFilter()

in src/AWS.Logger.AspNetCore/AWSLoggerProvider.cs [137:149]


        public static Func<string, LogLevel, bool> CreateConfigSectionFilter(IConfiguration logLevels, string categoryName)
        {
            string name = categoryName;
            foreach (var prefix in GetKeyPrefixes(name))
            {
                LogLevel level;
                if (TryGetSwitch(prefix, logLevels, out level))
                {
                    return (n, l) => l >= level;
                }
            }
            return (n, l) => false;
        }