示例#1
0
文件: Logger.cs 项目: wushian/CLK
        public void Error(string message, Exception exception = null, [CallerMemberName] string methodName = "")
        {
            #region Contracts

            if (string.IsNullOrEmpty(message) == true)
            {
                throw new ArgumentException();
            }

            #endregion

            // Exception
            while (exception?.InnerException != null)
            {
                exception = exception.InnerException;
            }

            // Log
            _loggerProvider.Error(message, exception, methodName);
        }