/// <summary> /// log using debug log level /// </summary> /// <param name="ex"> the exception to be logged</param> /// <param name="logObjectsArr">array of objects to log their values for custom message user must override toSting() method</param> /// <param name="messageFormat">format of the message to be logged</param> /// <param name="messageParameters">the parameters to fill the message placeholders</param> public static void LogDebug(string messageFormat, object[] messageParameters = null , Exception ex = null, object[] logObjectsArr = null , [CallerMemberName] string callerInfo = "") { string finalMessage = CreateLogMessage(logObjectsArr, messageFormat, callerInfo, messageParameters); if (ex == null) { CurrentLogger.Debug(finalMessage); } else { CurrentLogger.Debug(ex, finalMessage); } }
/// <summary> /// 记录调试信息 /// </summary> /// <param name="msg"></param> public static void Debug(string msg) { CurrentLogger.Debug(msg); }
/// <summary> /// 记录调试信息 /// </summary> /// <param name="msg"></param> public static void Debug(string msg) { CurrentLogger.Debug(msg); Console.WriteLine(msg); }
/// <inheritdoc /> public void Debug(string message) { CurrentLogger?.Debug(message); }