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#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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);
}
}
}