You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed when running Debug builds that each enabled logger is sending its output to the Output window in Visual Studio. So you end with double or multiple of the same output e.g. here is the output with both the AddTraceLogger and AddInMemoryLogger configured:
This creates extra noise to sort through in the output window. Am I missing something that controls this in the configuration? Or could there be something added to address it?
Here is how I have it configured:
builder.Logging
.SetMinimumLevel(LogLevel.Trace) // IMPORTANT: set the overall minimum log level else individual logger filters may not work
#if DEBUG
.AddTraceLogger(options => // Writes to the Debug output
{
options.MinLevel = LogLevel.Trace;
options.MaxLevel = LogLevel.Critical;
})
#endif
.AddInMemoryLogger(options => // Write to memory in support of displaying events in a UI
{
options.MaxLines = 1024;
options.MinLevel = LogLevel.Debug;
options.MaxLevel = LogLevel.Critical;
});
Actually looking at this now I see the memory logger MinLevel is supposed to be Debug but the output is still showing Trace messages. Hmm.
The text was updated successfully, but these errors were encountered:
I've noticed when running Debug builds that each enabled logger is sending its output to the Output window in Visual Studio. So you end with double or multiple of the same output e.g. here is the output with both the AddTraceLogger and AddInMemoryLogger configured:
19|2024-04-02T18:16:19.5288469+00:00|TRACE|1|CreateLogger FlyoutMenuViewModel
20|2024-04-02T18:16:19.5308830+00:00|TRACE|1|Created Logger 'FlyoutMenuViewModel'
21|2024-04-02T18:16:19.5320016+00:00|TRACE|1|CreateLogger FlyoutMenuViewModel
22|2024-04-02T18:16:19.5330669+00:00|TRACE|1|Created Logger 'FlyoutMenuViewModel'
This creates extra noise to sort through in the output window. Am I missing something that controls this in the configuration? Or could there be something added to address it?
Here is how I have it configured:
Actually looking at this now I see the memory logger MinLevel is supposed to be Debug but the output is still showing Trace messages. Hmm.
The text was updated successfully, but these errors were encountered: