Browse Source

refactor log extension

master
Savorboard 6 years ago
parent
commit
e6af8ed5bd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/DotNetCore.CAP/LoggerExtensions.cs

+ 2
- 2
src/DotNetCore.CAP/LoggerExtensions.cs View File

@@ -35,9 +35,9 @@ namespace DotNetCore.CAP
logger.LogWarning($"The {retries}th retrying send a message failed. message id: {messageId} "); logger.LogWarning($"The {retries}th retrying send a message failed. message id: {messageId} ");
} }


public static void MessageHasBeenSent(this ILogger logger, double seconds)
public static void MessageHasBeenSent(this ILogger logger, string name, string content)
{ {
logger.LogDebug($"Message published. Took: {seconds} secs.");
logger.LogDebug($"Message published. name: {name}, content:{content}.");
} }


public static void MessagePublishException(this ILogger logger, int messageId, string reason, Exception ex) public static void MessagePublishException(this ILogger logger, int messageId, string reason, Exception ex)


Loading…
Cancel
Save