// Methods public void Debug(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.Debug(message, exception, methodName); }