13 lines
369 B
C#
13 lines
369 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
namespace MaksIT.Core.Logging;
|
|
|
|
public static class LoggingBuilderExtensions {
|
|
public static ILoggingBuilder AddFile(this ILoggingBuilder builder, string filePath) {
|
|
builder.Services.AddSingleton<ILoggerProvider>(new FileLoggerProvider(filePath));
|
|
return builder;
|
|
}
|
|
}
|