网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
using FluentFTP;
using Microsoft.Extensions.Logging;

namespace Dpz.Core.Service.ObjectStorage;

public class FtpLogger(ILogger<FtpLogger> logger) : IFtpLogger
{
    public void Log(FtpLogEntry entry)
    {
        switch (entry.Severity)
        {
            case FtpTraceLevel.Verbose:
                logger.LogDebug(exception:entry.Exception, message: entry.Message);
                break;
            case FtpTraceLevel.Info:
                logger.LogInformation(exception:entry.Exception, message: entry.Message);
                break;
            case FtpTraceLevel.Warn:
                logger.LogWarning(exception:entry.Exception, message: entry.Message);
                break;
            case FtpTraceLevel.Error:
                logger.LogError(exception:entry.Exception, message: entry.Message);
                break;
            default:
                logger.LogInformation(exception:entry.Exception, message: entry.Message);
                break;
        }
        
    }
}
loading