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

24 lines
604 B

using log4net;
using System;
using System.IO;
using System.Web;
namespace NFine.Code
{
public class LogFactory
{
static LogFactory()
{
FileInfo configFile = new FileInfo(HttpContext.Current.Server.MapPath("/Configs/log4net.config"));
log4net.Config.XmlConfigurator.Configure(configFile);
}
public static Log GetLogger(Type type)
{
return new Log(LogManager.GetLogger(type));
}
public static Log GetLogger(string str)
{
return new Log(LogManager.GetLogger(str));
}
}
}