public static LogsFileDatabaseEntry LookupLogFile(string logName) { LogsFileDatabaseEntry dbe = Instance.FindFile(logName); if (dbe == null) { dbe = Instance.AddFileEntry(logName); } FileInfo fi = new FileInfo(logName); dbe.LogFileExists = fi.Exists; var creationTime = fi.CreationTimeUtc; if (dbe.LogFileExists && creationTime != dbe.CreationTimeUtc) { dbe.NewFile = true; dbe.Previous = ""; } dbe.CreationTimeUtc = creationTime; return(dbe); }