public void Error(string message) { var callInfo = DiagnosticsHelper.GetNotLoggingSupportCallInfo(); var result = LogHelper.BuildLogString(DateTime.Now, KindOfLogLevel.ERROR.ToString(), callInfo.FullClassName, callInfo.MethodName, message); _logger.Error(result); }
public void Log(string message) { lock (_lockObj) { if (!_context.Enable) { return; } WriteRawLog(message); var now = DateTime.Now; var tmpCallInfo = DiagnosticsHelper.GetNotLoggingSupportCallInfo(); var result = LogHelper.BuildLogString(now, KindOfLogLevel.LOG.ToString(), tmpCallInfo.FullClassName, tmpCallInfo.MethodName, message); WriteRaw(result); } }