using EonaCat.LogStack.Core;
using System.Runtime.CompilerServices;

namespace EonaCat.LogStack.Boosters;

// This file is part of the EonaCat project(s) which is released under the Apache License.
// See the LICENSE file or go to https://EonaCat.com/License for full license details.

/// <summary>
/// Filters log events based on level
/// </summary>
public sealed class LevelFilterBooster : BoosterBase
{
    private readonly LogLevel _minimumLevel;

    public LevelFilterBooster(LogLevel minimumLevel) : base("LevelFilter")
    {
        _minimumLevel = minimumLevel;
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public override bool Boost(ref LogEventBuilder builder)
    {
        // Filter will be handled by the pipeline, this is a no-op booster
        // Actual filtering happens in the logger pipeline based on configuration
        return true;
    }
}
