You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
543 B
C#

2 years ago
using System.IO;
using System.Reflection;
namespace CommonFunc
{
public class LogHelper
{
public static LogHelper instance = new LogHelper();
public log4net.ILog log = null;
public LogHelper()
{
//那么我就获取log4net的配置文件并将它加载到我们的项目中去
log4net.Config.XmlConfigurator.Configure(new FileInfo(@"Config\log4net.config"));
log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
}
}
}