添加项目文件。
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using log4net;
|
||||
using System;
|
||||
|
||||
namespace JY.Inspection
|
||||
{
|
||||
internal class Log4Helper
|
||||
{
|
||||
public static void WriteLog(Type t, Exception ex)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(t);
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
public static void WriteLog(Type t, string msg)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(t);
|
||||
log.Info(msg);
|
||||
}
|
||||
|
||||
public static void WriteLog(string className, Exception ex)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(className);
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
public static void WriteLog(string className, string msg)
|
||||
{
|
||||
ILog log = LogManager.GetLogger(className);
|
||||
log.Info(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user