/// <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);
            }
        }
示例#2
0
 /// <summary>
 /// 记录调试信息
 /// </summary>
 /// <param name="msg"></param>
 public static void Debug(string msg)
 {
     CurrentLogger.Debug(msg);
 }
示例#3
0
        /// <summary>
        /// 记录调试信息
        /// </summary>
        /// <param name="msg"></param>
        public static void Debug(string msg)
        {
            CurrentLogger.Debug(msg);

            Console.WriteLine(msg);
        }
示例#4
0
 /// <inheritdoc />
 public void Debug(string message)
 {
     CurrentLogger?.Debug(message);
 }