1234567891011121314151617181920212223 |
- using Microsoft.Extensions.Configuration;
- using Microsoft.Extensions.Logging;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace CZFW.Logger
- {
- public static class FileLoggerExtensions
- {
- public static ILoggerFactory AddFile(this ILoggerFactory factory, IConfiguration configuration)
- {
- return AddFile(factory, new FileLoggerSettings(configuration));
- }
- public static ILoggerFactory AddFile(this ILoggerFactory factory, FileLoggerSettings fileLoggerSettings)
- {
- factory.AddProvider(new FileLoggerProvider(fileLoggerSettings));
- return factory;
- }
- }
- }
|