[REFACTOR] Refactored logging & added support for Microsoft.Extensions.Logging. Added test WebApi project
This commit is contained in:
14
DotBased.Logging.MEL/LoggerBuilderExtensions.cs
Normal file
14
DotBased.Logging.MEL/LoggerBuilderExtensions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace DotBased.Logging.MEL;
|
||||
|
||||
public static class LoggerBuilderExtensions
|
||||
{
|
||||
public static ILoggingBuilder AddDotBased(this ILoggingBuilder builder, LogOptions options)
|
||||
{
|
||||
if (builder == null)
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
builder.AddProvider(new BasedLoggerProvider(options));
|
||||
return builder;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user