namespace Logger;

/// <summary>
/// Factory for creating logger instances
/// </summary>
public static class LoggerFactory
{
    /// <summary>
    /// Create a logger that writes to console and file
    /// </summary>
    public static ILogger CreateCompositeLogger(
        LogLevel consoleLevel = LogLevel.Trace,
        FileLoggerOptions? fileOptions = null)
    {
        var consoleLogger = new ConsoleLogger(consoleLevel);
        var fileLogger = new FileLogger(fileOptions ?? new FileLoggerOptions());
        
        return new CompositeLogger(consoleLogger, fileLogger);
    }

    /// <summary>
    /// Create a console-only logger
    /// </summary>
    public static ILogger CreateConsoleLogger(LogLevel minimumLevel = LogLevel.Trace)
    {
        return new ConsoleLogger(minimumLevel);
    }

    /// <summary>
    /// Create a file-only logger
    /// </summary>
    public static ILogger CreateFileLogger(FileLoggerOptions? options = null)
    {
        return new FileLogger(options ?? new FileLoggerOptions());
    }
}
