Beispiel #1
0
        /// <summary>
        ///     记录日志
        /// </summary>
        /// <param name="loggerLevels">日志级别</param>
        /// <param name="message">日志消息</param>
        public override void Log(LoggerLevels loggerLevels, object message)
        {
            switch (loggerLevels)
            {
            case LoggerLevels.Trace:
                _logger.Trace(message);
                break;

            case LoggerLevels.Debug:
                _logger.Debug(message);
                break;

            case LoggerLevels.Info:
                _logger.Info(message);
                break;

            case LoggerLevels.Warn:
                _logger.Warn(message);
                break;

            case LoggerLevels.Error:
                _logger.Error(message);
                break;

            case LoggerLevels.Fatal:
                _logger.Fatal(message);
                break;

            default:
                break;
            }
            ExcutedOnLog(loggerLevels, message);
        }
Beispiel #2
0
        private void Trace(string?message,
                           [CallerMemberName] string?previousMethodName = null,
                           [CallerLineNumber] int callermemberlineNo    = 0,
                           [CallerFilePath] string?calledFilePath       = null)
        {
            if (string.IsNullOrEmpty(message))
            {
                NullError(nameof(message));
                return;
            }

            LogModule?.Trace($"{previousMethodName}() {message}");
        }
Beispiel #3
0
 public void Trace(string msg) => nLogger.Trace(msg);
Beispiel #4
0
 public void Trace(string text)
 {
     Logger.Trace(text);
 }
Beispiel #5
0
 public void Verbose(string message)
 {
     _logger.Trace(message);
 }
Beispiel #6
0
 /// <inheritdoc/>
 public void Trace(string message) => _log.Trace(message);