Пример #1
0
        public CentralLogger(string categoryName, CentralLogOptions options)
        {
            this.categoryName = categoryName;
            this.options      = options;

            timer = new Timer(100);
            timer.Start();
            timer.AutoReset = false;
            timer.Elapsed  += ProcessJob;
        }
Пример #2
0
 public CentralLogProvider(CentralLogOptions options)
 {
     this.options = options;
 }
Пример #3
0
 public static ILoggingBuilder AddCentralLog(this ILoggingBuilder builder, CentralLogOptions options)
 {
     builder.Services.AddSingleton <CentralLogOptions>(options);
     builder.Services.AddSingleton <ILoggerProvider, CentralLogProvider>();
     return(builder);
 }