| | 1 | | // Copyright (c) ZeroC, Inc. |
| | 2 | |
|
| | 3 | | using Microsoft.Extensions.Logging; |
| | 4 | |
|
| | 5 | | namespace IceRpc.Retry.Internal; |
| | 6 | |
|
| | 7 | | internal static partial class RetryInterceptorLoggerExtensions |
| | 8 | | { |
| 1 | 9 | | private static readonly Func<ILogger, int, int, IDisposable?> _retryScope = |
| 1 | 10 | | LoggerMessage.DefineScope<int, int>("Retry (Attempt = {Attempt}, MaxAttempts = {MaxAttempts})"); |
| | 11 | |
|
| | 12 | | internal static IDisposable? RetryScope(this ILogger logger, int attempt, int maxAttempts) => |
| 1 | 13 | | _retryScope(logger, attempt, maxAttempts); |
| | 14 | | } |