using AyCode.Core.Enums;

namespace AyCode.Core.Loggers;

/// <summary>
/// Configuration for the <see cref="AcLoggerBase"/> factory pattern.
/// <para>
/// Consumer usage:
/// <code>
/// services.Configure&lt;AcLoggerOptions&gt;(configuration.GetSection("AyCode:Logger"));
/// services.AddAcLoggerFactory&lt;MyConcreteLogger&gt;();
/// </code>
/// </para>
/// <para>
/// Binds from <c>appsettings.json</c> shape:
/// <code>
/// "AyCode": { "Logger": { "AppType": "Web", "LogLevel": "Debug" } }
/// </code>
/// </para>
/// </summary>
public sealed class AcLoggerOptions
{
    /// <summary>Application type stamped on every log entry. Default: <see cref="AppType.Server"/>.</summary>
    public AppType AppType { get; set; } = AppType.Server;

    /// <summary>Global minimum log level. Entries below this level are discarded. Default: <see cref="LogLevel.Info"/>.</summary>
    public LogLevel LogLevel { get; set; } = LogLevel.Info;
}
