标签:str except int ilo interface logger mes current bsp
接口ILogBase:
public interface ILogBase { void Debug(string message); void Debug(string message, Exception ex); void Info(string message); void Info(string message, Exception ex); void Warn(string message); void Warn(string message, Exception ex); void Error(string message); void Error(string message, Exception ex); void Fatal(string message); void Fatal(string message, Exception ex); }
实现NLogger:
public class NLogger : ILogBase { private readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); public void Debug(string message) { logger.Debug(message); } public void Debug(string message, Exception ex) { logger.Debug(ex,message); } public void Error(string message) { logger.Error(message); } public void Error(string message, Exception ex) { logger.Error(ex,message); } public void Fatal(string message) { logger.Fatal(message); } public void Fatal(string message, Exception ex) { logger.Fatal(ex,message); } public void Info(string message) { logger.Info(message); } public void Info(string message, Exception ex) { logger.Info(ex,message); } public void Warn(string message) { logger.Warn(message); } public void Warn(string message, Exception ex) { logger.Warn(ex,message); } }
标签:str except int ilo interface logger mes current bsp
原文地址:http://www.cnblogs.com/panpanwelcome/p/7576162.html