-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Description
The SerilogFactory.Create(string name, Castle.Core.Logging.LoggerLevel level) overload modifies the MinimumLevel of the passed in LoggerConfiguration and overwrites it with the equivalent logging level to the Castle LoggerLevel enum. Each call of the Create method will modify the single LoggerConfiguration object with the level being passed in.
There is no need for the Serilog integration to support this overload, it is only there for loggers that don't support levels (e.g. ConsoleLogger, TraceLogger) which use LevelFilteredLogger. It just confuses things to have two logging frameworks filtering by log levels. Both log4net and NLog integrations throw a NotSupportedException for this overload.
| .MinimumLevel.Is(serilogLevel) |
var config = new LoggerConfiguration()
.WriteTo....
var factory = new SerilogFactory(config);
var logger = factory.Create("MyLogger", LoggerLevel.Debug); <-- config has been modified by the factory
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels