using log4net; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TeamAAS_VP { public static class LogHelper { public static readonly ILog loginfo = LogManager.GetLogger("loginfo"); public static readonly ILog logerror = LogManager.GetLogger("logerror"); public static readonly ILog logdebug = LogManager.GetLogger("logdebug"); public static readonly ILog logwarn = LogManager.GetLogger("logwarn"); public static readonly ILog logfatal = LogManager.GetLogger("logfatal"); public static readonly ILog logDynamic = LogManager.GetLogger("logDynamic"); public static readonly ILog logCT = LogManager.GetLogger("logCT"); public static void WriteLogInfo(string info) { if (loginfo.IsInfoEnabled) { loginfo.Info(info); } } public static void WriteLogDebug(string info) { if (logdebug.IsDebugEnabled) { logdebug.Debug(info); } } public static void WriteLogWarn(string info) { if (logwarn.IsWarnEnabled) { logwarn.Warn(info); } } public static void WriteLogError(string info, Exception se) { if (logerror.IsErrorEnabled) { logerror.Error(info, se); } } public static void WriteLogFatal(string info, Exception se) { if (logfatal.IsFatalEnabled) { logfatal.Fatal(info, se); } } public static void WriteOther(string info) { if (logDynamic.IsInfoEnabled) { logDynamic.Info(info); } } public static void WriteLogCT(string info) { if (logCT.IsInfoEnabled) { logCT.Info(info); } } } }