microsoft-logging icon indicating copy to clipboard operation
microsoft-logging copied to clipboard

Sample uses obselete methods

Open jhumphries83 opened this issue 6 years ago • 0 comments

Hi,

When I use the sample code in Readme.md to create a logger factory I get a warning that it is obselete: "This method is obselete and will be removed in future versions. The recommended alternative is using LoggerFactory to configure filtering and ConsoleLoggerOptions to configure logging options."

I'm not quite sure how to implement that, could the sample code be updated?

The sample code in question is:

Create and configure LoggerFactory

ILoggerFactory loggerFactory = new LoggerFactory();
loggerFactory.AddProvider(new ConsoleLoggerProvider((text, logLevel) => logLevel >= LogLevel.Debug, false));

Thanks

Jim

jhumphries83 avatar Aug 23 '19 16:08 jhumphries83