-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug logs not appearing without explicity setting minimum level #17
Comments
The overall log configuration also has a minimum level that's the first level of filtering - the default for that is After that, each sink to which events are being written can impose a more restrictive filter at the point of entry - i.e. the default you are referring to is being applied, but you're correct that the NOTE: in future, you're best off asking usage questions like this on stackoverflow.com as the template suggests; you'll normally get much quicker answers, and the issue tracker has one less issue... |
Gotcha, thanks. However, I do question why the README in this repo shows DBG logs in the screenshot of the console window when the code in the blocks above it will not be able to produce any DBG level logs (this is the code I was going by while integrating this library to my codebase). It's mighty confusing that a debug log sink's setup instructions do not allow the production of debug level logs out of the box without extra logger config that isn't directly documented (unless it is documented and I'm blind). |
Oh, that's a good catch in that instance - a PR to fix the readme would be much appreciated. I can remember being confused by the default minimum level and why stuff wasnt appearing myself, though the default does make sense to me in terms of trying to keep logs sane. |
Added instructions for chaining debug level call. Also the same for the XML and JSON config.
I am having a strange issue where
LogEventLevel.Debug
logs (or those written directly viaLog.Debug()
) do not show in the Debug console, unless.MinimumLevel.Debug()
is applied to the global logger, despite the fact that the extension's defaultrestrictedToMinimumLevel
parameter is defaulted toLevelAlias.Minimum
so the sink itself should be actioningdebug
level logs.Configuring logger:
Logging.cs
App.xaml.cs
Debug console:
Confusingly, this starts to work if I apply a
.MinimumLevel.Debug()
chain to the logger initialisation:...but not if this is applied to the sink itself (which I would assume to be redundant as the sink defaults to this anyway):
Running version
3.0.0
of this package inside a .NET 8.0 WPF Solution.The text was updated successfully, but these errors were encountered: