private static void FillInLoggingEventWithExtendedProperties(ExtendedLogInfo info, LoggingEvent loggingEvent) { // todo: add caching or fast reflection to improve performances a bit foreach (var pi in info.GetType().GetProperties()) { loggingEvent.Properties[pi.Name] = pi.GetValue(info, null); } }
public void Info(string message, Exception exception, ExtendedLogInfo info) { if (IsInfoEnabled) { LoggingEvent loggingEvent = new LoggingEvent(Logger.Logger.GetType(), Logger.Logger.Repository, Logger.Logger.Name, Level.Info, message, exception); FillInLoggingEventWithExtendedProperties(info, loggingEvent); Logger.Logger.Log(loggingEvent); } }
public void Warn(string message, Exception exception, ExtendedLogInfo info) { }
public void Debug(string message, Exception exception, ExtendedLogInfo info) { }
public void Fatal(string message, Exception exception, ExtendedLogInfo info) { }
public void Error(string message, Exception exception, ExtendedLogInfo info) { }