-
Notifications
You must be signed in to change notification settings - Fork 246
Remove ILoggerFactory.MinimumLevel #298
Comments
👍 this should have been removed a while ago! |
Agreed! |
merged to dev |
so is there a new way to set the loglevel? |
@joeaudette the thing is, this never set the log level. That's why we're removing it. It just sets the minimum allowed log level. Each individual logger (e.g. DebugLogger, ConsoleLogger, EventLogLogger, SerilogLogger, etc.) has their own configuration and settings to decide what they track. |
that makes sense, Thanks! |
just to help others since breaking change announcements usually provide the old and the new way of doing things.
new way:
|
@joeaudette thanks for the suggestion. |
@joeaudette that makes things clearer indeed. |
BTW, you always needed |
I'm sure that is true but some people might have thought it was working if the default level happened to correspond to the factory setting even though that didn't do anything. Illustrating the proper way to configure logging is the way to clear up confusion. Myself I had implemented a custom database logger and provider with my own factory extension that did use the loglevel setting of the factory. So the announcement just saying that setting was removed because it didn't do anything left me initially confused. |
This property has two things going against it:
This is teh codez: https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.Abstractions/ILoggerFactory.cs#L14-L17
@lodejard @muratg @DamianEdwards
The text was updated successfully, but these errors were encountered: