From 791250a633f928df25ba873ca9cc5a1fea4ce8f1 Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 16 Apr 2024 13:03:21 -0700 Subject: [PATCH] Dispose of the logger factory to flush logs on exit (#8103) --- .../Commands/RotationCommandBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/secret-management/Azure.Sdk.Tools.SecretManagement.Cli/Commands/RotationCommandBase.cs b/tools/secret-management/Azure.Sdk.Tools.SecretManagement.Cli/Commands/RotationCommandBase.cs index 28e73cc965f..539cc834242 100644 --- a/tools/secret-management/Azure.Sdk.Tools.SecretManagement.Cli/Commands/RotationCommandBase.cs +++ b/tools/secret-management/Azure.Sdk.Tools.SecretManagement.Cli/Commands/RotationCommandBase.cs @@ -66,7 +66,7 @@ private async Task ParseAndHandleCommandAsync(InvocationContext invocationContex LogLevel logLevel = verbose ? LogLevel.Trace : LogLevel.Information; - ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder + using ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder .AddConsoleFormatter() .AddConsole(options => options.FormatterName = SimplerConsoleFormatter.FormatterName) .SetMinimumLevel(logLevel));