using AyCode.Core.Enums;
using AyCode.Core.Loggers;
using FruitBank.Common;
using FruitBank.Common.Loggers;
using Mango.Nop.Core.Loggers;

namespace FruitBankHybrid.Shared.Services.Loggers;

public class LoggerClient : Logger, ILogger
{
    public LoggerClient() : this(null)
    {
    }

    public LoggerClient(string? categoryName) : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, categoryName)
    { }

    public LoggerClient(string? categoryName, params IAcLogWriterBase[] logWriters) : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, categoryName, logWriters)
    { }

    public LoggerClient(AppType appType, LogLevel logLevel, string? categoryName, params IAcLogWriterBase[] logWriters) : base(appType, logLevel, categoryName, logWriters)
    { }
}

public class LoggerClient<TCategory> : LoggerClient, ILogger<TCategory>
{
    public LoggerClient() : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, typeof(TCategory).Name)
    { }

    public LoggerClient(params IAcLogWriterClientBase[] logWriters) : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, typeof(TCategory).Name, logWriters)
    { }
    
    public LoggerClient(AppType appType, LogLevel logLevel, params IAcLogWriterClientBase[] logWriters) : base(appType, logLevel, typeof(TCategory).Name, logWriters)
    { }
}