Example #1
0
 public void Debug(string message)
 {
     if (_logger.IsDebugEnabled)
     {
         _logger.Debug(message);
     }
 }
Example #2
0
 /// <summary>
 /// 记录调试信息到日志。
 /// </summary>
 /// <param name="message">要记录的信息。</param>
 /// <param name="exception">异常对象。</param>
 public void Debug(object message, Exception exception = null)
 {
     if (LogEnvironment.IsConfigured(LogLevel.Debug))
     {
         _logger.Debug(exception, message?.ToString());
     }
 }
Example #3
0
        /// <summary>
        /// Logs the specified information.
        /// </summary>
        /// <param name="entry"></param>
        public void Log(LogEntry entry)
        {
            switch (entry.Severity)
            {
            case LogLevel.Information:
            {
                logger.Info(entry.Exception, entry.Message);
                break;
            }

            case LogLevel.Debug:
            {
                logger.Debug(entry.Exception, entry.Message);

                break;
            }

            case LogLevel.Warning:
            {
                logger.Warn(entry.Exception, entry.Message);

                break;
            }

            case LogLevel.Error:
            {
                logger.Error(entry.Exception, entry.Message);

                break;
            }

            default:
            {
                logger.Fatal(entry.Exception, entry.Message);

                break;
            }
            }
        }
        public void Log(LogEntry entry)
        {
            switch (entry.Severity)
            {
            case LoggingEventType.Information when IsEnabledFor(LoggingEventType.Information):
                _logger.Info(entry.Exception, entry.Message);

                break;

            case LoggingEventType.Debug when IsEnabledFor(LoggingEventType.Debug):
                _logger.Debug(entry.Exception, entry.Message);

                break;

            case LoggingEventType.Warning when IsEnabledFor(LoggingEventType.Warning):
                _logger.Warn(entry.Exception, entry.Message);

                break;

            case LoggingEventType.Error when IsEnabledFor(LoggingEventType.Error):
                _logger.Error(entry.Exception, entry.Message);

                break;

            case LoggingEventType.Fatal when IsEnabledFor(LoggingEventType.Fatal):
                _logger.Fatal(entry.Exception, entry.Message);

                break;

            case LoggingEventType.Trace when IsEnabledFor(LoggingEventType.Trace):
                _logger.Trace(entry.Exception, entry.Message);

                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Example #5
0
        public void Debug(Exception exception, string messageTemplate, params object[] propertyValues)
        {
            var message = string.Format(messageTemplate, propertyValues);

            _logger.Debug(exception, CreateMessage(message));
        }
Example #6
0
 /// <summary>
 /// 记录调试信息到日志。
 /// </summary>
 /// <param name="message">要记录的信息。</param>
 /// <param name="exception">异常对象。</param>
 public void Debug(object message, Exception exception = null)
 {
     log.Debug(exception, message?.ToString());
 }
Example #7
0
 public void Debug(string s)
 {
     _logger.Debug(s);
 }
Example #8
0
 /// <summary>
 /// Log debug messages.
 /// </summary>
 /// <param name="format">The message format string.</param>
 /// <param name="arguments">The message format argument array.</param>
 public override void Debug(string format, params object[] arguments)
 {
     _logger.Debug(format, arguments);
 }
Example #9
0
 public void LogDebug(string format, params object[] args)
 {
     _nlog.Debug(format, args);
 }
Example #10
0
 /// <summary>
 /// 记录调试信息到日志。
 /// </summary>
 /// <param name="message">要记录的信息。</param>
 /// <param name="exception">异常对象。</param>
 public void Debug(string message, Exception exception = null)
 {
     log.Debug(exception, message);
 }
Example #11
0
 public void Debug(string message)
 {
     _logger.Debug(message);
 }
Example #12
0
 public void Debug <T>(T value)
 {
     mLogger.Debug(value);
 }
Example #13
0
 public void Debug <T>(string messageTemplate, T propertyValue)
 {
     _logger.Debug(messageTemplate, propertyValue);
 }