You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0 KiB

3 years ago
using EC.NetLogger;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EC.NetLogger
{
public class ECLoggerManager
{
public static void Init()
{
ECLogger.SubLog += ECLogger_SubLog;
}
private static void ECLogger_SubLog(ECLoggerModel log)
{
switch (log.Level)
{
case ECLoggerLevel.Debug:
LogUnit.Debug(log.Message);
break;
case ECLoggerLevel.Info:
LogUnit.Info(log.Message);
break;
case ECLoggerLevel.Warning:
LogUnit.Warn(log.Message);
NetLoggerManger.SendFileLogger("warning",log.Message);
break;
case ECLoggerLevel.Error:
LogUnit.Error(log.Message);
NetLoggerManger.SendFileLogger("error", log.Message);
break;
}
}
}
}