示例#1
0
 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);
     }
 }
示例#2
0
		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);
			}
		}
示例#3
0
 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);
     }
 }
示例#4
0
		public void Warn(string message, Exception exception, ExtendedLogInfo info)
		{
			
		}
示例#5
0
		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);
			}
		}
示例#6
0
 public void Debug(string message, Exception exception, ExtendedLogInfo info)
 {
 }
示例#7
0
 public void Fatal(string message, Exception exception, ExtendedLogInfo info)
 {
 }
示例#8
0
 public void Error(string message, Exception exception, ExtendedLogInfo info)
 {
 }