Repository: dotnet/runtime
File: src/libraries/Microsoft.Extensions.Logging/src/FilterLoggingBuilderExtensions.cs (C#)

Code before:
        /// <item><description>The full type name of the <see cref="ILoggerProvider"/> (e.g., "Microsoft.Extensions.Logging.Console.ConsoleLoggerProvider").</description></item>
        /// <item><description>The logger category name (e.g., "MyNamespace.MyClass").</description></item>
        /// <item><description>The <see cref="LogLevel"/> of the log message.</description></item>
        /// </list>
        /// Return <see langword="true"/> to allow the message to be logged, or <see langword="false"/> to filter it out.
        /// </remarks>
        public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, string?, LogLevel, bool> filter) =>
            AddRule(builder, filter: filter);

        /// <summary>
        /// Adds a log filter to the factory.
        /// </summary>
        /// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param>
        /// <param name="categoryLevelFilter">The filter function to apply. The filter function receives the logger category name and the log level, and returns <see langword="true"/> to log the message or <see langword="false"/> to filter it out.</param>
        /// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns>
        /// <remarks>
        /// The filter function is called for each log message and receives two parameters:
        /// <list type="bullet">
        /// <item><description>The logger category name (e.g., "MyNamespace.MyClass").</description></item>
        /// <item><description>The <see cref="LogLevel"/> of the log message.</description></item>
        /// </list>
        /// Return <see langword="true"/> to allow the message to be logged, or <see langword="false"/> to filter it out.
        /// </remarks>
        public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) =>
            AddRule(builder, filter: (type, name, level) => categoryLevelFilter(name, level));

        /// <summary>
        /// Adds a log filter for the given <see cref="ILoggerProvider"/>.
        /// </summary>
        /// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param>
        /// <param name="categoryLevelFilter">The filter function to apply. The filter function receives the logger category name and the log level, and returns <see langword="true"/> to log the message or <see langword="false"/> to filter it out.</param>
        /// <typeparam name="T">The <see cref="ILoggerProvider"/> which this filter will be added for.</typeparam>
        /// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns>
        /// <remarks>
        /// The filter function is called for each log message from the specified provider and receives two parameters:
        /// <list type="bullet">
        /// <item><description>The logger category name (e.g., "MyNamespace.MyClass").</description></item>
        /// <item><description>The <see cref="LogLevel"/> of the log message.</description></item>
        /// </list>
        /// Return <see langword="true"/> to allow the message to be logged, or <see langword="false"/> to filter it out.
        /// </remarks>
        public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) where T : ILoggerProvider =>
            AddRule(builder, type: typeof(T).FullName, filter: (type, name, level) => categoryLevelFilter(name, level));

        /// <summary>
        /// Adds a log filter to the factory.
        /// </summary>
        /// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param>
        /// <param name="levelFilter">The filter function to apply.</param>
        /// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns>
        public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<LogLevel, bool> levelFilter) =>

Review comment (suggestion):
The XML docs for the `LoggerFilterOptions` overloads were corrected here, but there is still at least one remaining `LoggerFilterOptions AddFilter<T>(...)` overload later in this same file whose `<param name="builder">` / `<returns>` text still references `ILoggingBuilder` even though the parameter/return types are `LoggerFilterOptions` (around line 234). Please update that remaining overload too so the docs are consistent and correct.

Code after:

        /// <summary>
        /// Adds a log filter for the given <see cref="ILoggerProvider"/>.
        /// </summary>
        /// <param name="builder">The <see cref="ILoggingBuilder"/> to add the filter to.</param>
        /// <param name="category">The category to filter.</param>
        /// <param name="levelFilter">The filter function to apply. The filter function receives the log level and returns <see langword="true"/> to log the message or <see langword="false"/> to filter it out.</param>
        /// <typeparam name="T">The <see cref="ILoggerProvider"/> which this filter will be added for.</typeparam>
        /// <returns>The <see cref="ILoggingBuilder"/> so that additional calls can be chained.</returns>
        /// <remarks>
        /// The filter function is called for each log message from the specified provider and category and receives one parameter:
        /// <list type="bullet">
        /// <item><description>The <see cref="LogLevel"/> of the log message.</description></item>
        /// </list>
        /// Return <see langword="true"/> to allow the message to be logged, or <see langword="false"/> to filter it out.
        /// </remarks>
        public static ILoggingBuilder AddFilter<T>(this ILoggingBuilder builder, string? category, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider =>
            builder.ConfigureFilter(options => options.AddFilter<T>(category, levelFilter));

        /// <summary>
        /// Adds a log filter to the factory.
        /// </summary>
        /// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param>
        /// <param name="filter">The filter function to apply. The filter function receives the provider type full name, the logger category name, and the log level, and returns <see langword="true"/> to log the message or <see langword="false"/> to filter it out.</param>
        /// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns>
        /// <remarks>
        /// The filter function is called for each log message and receives three parameters:
        /// <list type="bullet">
        /// <item><description>The full type name of the <see cref="ILoggerProvider"/> (e.g., "Microsoft.Extensions.Logging.Console.ConsoleLoggerProvider").</description></item>
        /// <item><description>The logger category name (e.g., "MyNamespace.MyClass").</description></item>
        /// <item><description>The <see cref="LogLevel"/> of the log message.</description></item>
        /// </list>
        /// Return <see langword="true"/> to allow the message to be logged, or <see langword="false"/> to filter it out.
        /// </remarks>
        public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, string?, LogLevel, bool> filter) =>
            AddRule(builder, filter: filter);

        /// <summary>
        /// Adds a log filter to the factory.
        /// </summary>
        /// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param>
        /// <param name="categoryLevelFilter">The filter function to apply. The filter function receives the logger category name and the log level, and returns <see langword="true"/> to log the message or <see langword="false"/> to filter it out.</param>
        /// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns>
        /// <remarks>
        /// The filter function is called for each log message and receives two parameters:
        /// <list type="bullet">
        /// <item><description>The logger category name (e.g., "MyNamespace.MyClass").</description></item>
        /// <item><description>The <see cref="LogLevel"/> of the log message.</description></item>
        /// </list>
        /// Return <see langword="true"/> to allow the message to be logged, or <see langword="false"/> to filter it out.
        /// </remarks>