@@ -19,6 +19,7 @@ internal static class LoggingExtensions
19
19
private static Action < ILogger , Exception ? > _sessionCommitCanceled ;
20
20
private static Action < ILogger , Exception ? > _sessionRefreshTimeout ;
21
21
private static Action < ILogger , Exception ? > _sessionRefreshCanceled ;
22
+ private static Action < ILogger , Exception ? > _sessionNotAvailable ;
22
23
23
24
static LoggingExtensions ( )
24
25
{
@@ -70,6 +71,10 @@ static LoggingExtensions()
70
71
eventId : new EventId ( 12 , "SessionRefreshCanceled" ) ,
71
72
logLevel : LogLevel . Information ,
72
73
formatString : "Refreshing the session was canceled." ) ;
74
+ _sessionNotAvailable = LoggerMessage . Define (
75
+ eventId : new EventId ( 13 , "SessionCommitNotAvailable" ) ,
76
+ logLevel : LogLevel . Information ,
77
+ formatString : "Session cannot be committed since it is unavailable." ) ;
73
78
}
74
79
75
80
public static void ErrorClosingTheSession ( this ILogger logger , Exception exception )
@@ -131,5 +136,7 @@ public static void SessionRefreshCanceled(this ILogger logger)
131
136
{
132
137
_sessionRefreshCanceled ( logger , null ) ;
133
138
}
139
+
140
+ public static void SessionNotAvailable ( this ILogger logger ) => _sessionNotAvailable ( logger , null ) ;
134
141
}
135
142
}
0 commit comments