Skip to content

Commit

Permalink
Dispose of the logger factory to flush logs on exit (#8103)
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr authored Apr 16, 2024
1 parent 8ac3c6b commit 791250a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimplerConsoleFormatter, ConsoleFormatterOptions>()
.AddConsole(options => options.FormatterName = SimplerConsoleFormatter.FormatterName)
.SetMinimumLevel(logLevel));
Expand Down

0 comments on commit 791250a

Please sign in to comment.