public static LogFileProvider Open(string filePath, BackgroundWorker worker, DoWorkEventArgs e) { try { logger.DebugFormat("Parsing log events from file {0}", filePath); LogFileProvider logs = new LogFileProvider(); logs.location = filePath; LogFileProvider.read(logs, worker, e); return(logs); } catch (Exception ex) { throw new OpenLogFileException(filePath, ex); } }
public void Watch(BackgroundWorker worker, DoWorkEventArgs e) { logger.DebugFormat("Tailing file {0}", this.Location); LogFileProvider.read(this, worker, e); }