예제 #1
0
        public LogParser(string logFileName, LogPattern logPattern)
        {
            if (!File.Exists(logFileName))
            {
                throw new FileNotFoundException(logFileName);
            }

            this.LogFileName      = logFileName;
            this.LogEntries       = new List <LogEntry>();
            this.LogEntriesLocker = new object();

            this.AllLogPartsFileNames = new List <string>();
            this.ForcedLogPattern     = logPattern != null;
            this.logPattern           = logPattern ?? PatternManager.GetPatternForLog(logFileName);


            log.DebugFormat("LogParsers created for file: {0} , Pattern: {1}", logFileName, this.logPattern);
        }
예제 #2
0
 public LogPattern(LogPattern copyFrom)
 {
     this.FileMask       = "Copy of " + copyFrom.FileMask;
     this.PatternText    = copyFrom.PatternText;
     this.DateTimeFormat = copyFrom.DateTimeFormat;
 }