Ejemplo n.º 1
0
 public PhysicalFileLogger(Func <string, LogLevel, bool> filter, PhysicalFileLoggerOptions options, string catelogName)
 {
     if (options == null)
     {
         throw new ArgumentNullException("PhysicalFileLoggerOptions");
     }
     this.filter      = filter;
     this.options     = options;
     this.catelogName = catelogName;
     if (string.IsNullOrWhiteSpace(this.catelogName))
     {
         catelogName = DefaultCatalogName;
     }
     filePath = InitFileName();
 }
 public PhysicalFileLoggerProvider(Func <string, LogLevel, bool> filter, IOptionsMonitor <PhysicalFileLoggerOptions> options)
 {
     if (this.filter == null)
     {
         this.filter = trueFilter;
     }
     else
     {
         this.filter = filter;
     }
     if (options == null)
     {
         this.options = new PhysicalFileLoggerOptions();
     }
     else
     {
         this.options     = options.CurrentValue;
         this.reloadToken = options.OnChange(Reload);
     }
 }
 public void Reload(PhysicalFileLoggerOptions options)
 {
     this.options = options;
 }