예제 #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);
        }
예제 #2
0
 public void LogEntry(LogEntryInfo entry)
 {
     entry.LoggerName = _scopeName;
     entry.Message    = "   " + entry.Message;
     _parent.LogEntry(entry);
 }
예제 #3
0
 public void LogEntry(LogEntryInfo entry)
 {
 }
예제 #4
0
 public void LogEntry(LogEntryInfo entry)
 {
     entry.LoggerName = m_logger.Name;
     m_logger.Log(LogEventInfoExtensions.FromLogEntry(entry));
 }