|
1234567891011121314151617181920212223242526272829 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using log4net;
-
- namespace Common.system
- {
- public class LogHelper
- {
- public static readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo");
- public static readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror");
- public static void WriteInfoLog(string info)
- {
- if (loginfo.IsInfoEnabled)
- {
- loginfo.Info(info);
- }
- }
-
- public static void WriteErrLog(string info, Exception ex)
- {
- if (logerror.IsErrorEnabled)
- {
- logerror.Error(info, ex);
- }
- }
- }
- }
|