Exemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="maxLogSize">Takes the maximum size we can write to the log
 /// in Mega Bytes.
 /// </param>
 public LogManager(
     Config config,
     string path
     )
 {
     this.maxLogSize = config.MaxLogFileSize * 1024 * 1024;
     this.path       = path;
     logFilter       = new LogFilter(config.MaxDomainsLogged);
     logFile         = new StreamWriter(
         new BufferedStream(
             File.Open(this.path, FileMode.CreateNew, FileAccess.Write, FileShare.Read), 4096)
         );
     logFileFullEvent = new EventLogThrottle(Config.AppEventLog);
 }
 public PolicyManager()
 {
     configFileFullThrottle         = new EventLogThrottle(Config.AppEventLog);
     configFileWriteFailureThrottle = new EventLogThrottle(Config.AppEventLog);
 }