using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; using log4net; [assembly: log4net.Config.XmlConfigurator(Watch = true)] namespace irisHelper { public class LogHelper { public static void WriteDebugLog(Type t, string msg) { log4net.ILog log = log4net.LogManager.GetLogger(t); log.Debug(msg); } public static void WriteInfoLog(Type t, string msg) { log4net.ILog log = log4net.LogManager.GetLogger(t); log.Info(msg); } public static void WriteWarnLog(Type t, string msg) { log4net.ILog log = log4net.LogManager.GetLogger(t); log.Warn(msg); } public static void WriteErrorLog(Type t, string msg) { log4net.ILog log = log4net.LogManager.GetLogger(t); log.Error(msg); } } }