Skip to content

Commit f3ad52c

Browse files
committed
make fields static
1 parent b3d666f commit f3ad52c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libraries/src/AWS.Lambda.Powertools.Logging/Internal/LoggingAspectHandler.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ internal class LoggingAspectHandler : IMethodAspectHandler
3535
/// <summary>
3636
/// The is cold start
3737
/// </summary>
38-
private bool _isColdStart = true;
38+
private static bool _isColdStart = true;
3939

4040
/// <summary>
4141
/// The initialize context
4242
/// </summary>
43-
private bool _initializeContext = true;
43+
private static bool _initializeContext = true;
4444

4545
/// <summary>
4646
/// Clear state?
@@ -388,6 +388,8 @@ private void LogEvent(object eventArg)
388388
/// </summary>
389389
internal static void ResetForTest()
390390
{
391+
_isColdStart = true;
392+
_initializeContext = true;
391393
PowertoolsLambdaContext.Clear();
392394
Logger.LoggerProvider = null;
393395
Logger.RemoveAllKeys();

0 commit comments

Comments
 (0)