Files
1440WGJ/JY.Inspection/Common/Log4Helper.cs
T

33 lines
750 B
C#
Raw Normal View History

2026-07-14 13:55:17 +08:00
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);
}
}
}