| 12345678910111213141516171819202122232425 |
- using log4net;
- using System;
- using System.IO;
- using System.Web;
- namespace CallCenter.Utility
- {
- 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));
- }
- }
- }
|