Beispiel #1
0
 /// <summary>
 /// Logs the specified debug message with an exception.
 /// </summary>
 /// <param name="messageFormat">The debug message to format.</param>
 /// <param name="exception">An exception to log with the message.</param>
 /// <param name="parameters">The parameters to used with the <see cref="messageFormat" />. The last parameter can be used to store <see cref="CallerInfo"/></param>
 /// <exception cref="System.ArgumentNullException"></exception>
 public static void Debug(this ILogger log, string messageFormat, Exception exception, params object[] parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException("parameters");
     }
     Debug(log, string.Format(messageFormat, parameters), exception, Logger.ExtractCallerInfo(parameters));
 }
 public static void Verbose([NotNull] this ILogger logger, [NotNull] string messageFormat, Exception exception, [NotNull] params object[] parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException(nameof(parameters));
     }
     Verbose(logger, string.Format(messageFormat, parameters), exception, Logger.ExtractCallerInfo(parameters));
 }