| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 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 readonly ILog logmes = LogManager.GetLogger("logMes");
- 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);
- }
- }
- public static void WriteLogMes(string info)
- {
- if (logmes.IsInfoEnabled)
- {
- logmes.Info(info);
- }
- }
- }
- }
|