Beispiel #1
0
        public static RealNLog.LogEventInfo FromLogEntry(LogEntryInfo entry)
        {
            var info = new RealNLog.LogEventInfo()
            {
                Exception = entry.Exception,
                Level     = ToNLogLevel(entry.Level),
                Message   = entry.Message,
                TimeStamp = entry.TimeStamp
            };

            info.LoggerName = entry.LoggerName;

            if (entry.Data != null)
            {
                info.Data(entry.GetFormattedData());
            }

            if (entry.StackTrace != null)
            {
                info.SetStackTrace(entry.StackTrace, 0);
            }

            info.UniqueLogId(entry.Id);

            return(info);
        }
Beispiel #2
0
 public void LogEntry(LogEntryInfo entry)
 {
     entry.LoggerName = _scopeName;
     entry.Message    = "   " + entry.Message;
     _parent.LogEntry(entry);
 }
Beispiel #3
0
 public void LogEntry(LogEntryInfo entry)
 {
 }
Beispiel #4
0
 public void LogEntry(LogEntryInfo entry)
 {
     entry.LoggerName = m_logger.Name;
     m_logger.Log(LogEventInfoExtensions.FromLogEntry(entry));
 }