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. <c>null</c> = a config nem adja meg — ilyenkor az
    /// <c>AddAcLoggerFactory(defaultAppType)</c> kód-defaultja érvényesül (host-onként a helyes érték: Web/Mobile/Server).
    /// Ha az appsettings kimondja, MINDIG a config nyer.</summary>
    public AppType? AppType { get; set; }

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