2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

Widen journal file filters for Odyssey Update 11

This commit is contained in:
Xjph 2022-03-15 12:15:18 -02:30
parent e4f90d5a62
commit f8eee18d78

View File

@ -98,7 +98,7 @@ namespace Observatory
SetLogMonitorState(currentState | LogMonitorState.Batch); SetLogMonitorState(currentState | LogMonitorState.Batch);
DirectoryInfo logDirectory = GetJournalFolder(path); DirectoryInfo logDirectory = GetJournalFolder(path);
var files = logDirectory.GetFiles("Journal.????????????.??.log"); var files = logDirectory.GetFiles("Journal.*.??.log");
var readErrors = new List<(Exception ex, string file, string line)>(); var readErrors = new List<(Exception ex, string file, string line)>();
foreach (var file in files) foreach (var file in files)
{ {
@ -117,8 +117,8 @@ namespace Observatory
SetLogMonitorState(currentState | LogMonitorState.PreRead); SetLogMonitorState(currentState | LogMonitorState.PreRead);
DirectoryInfo logDirectory = GetJournalFolder(Properties.Core.Default.JournalFolder); DirectoryInfo logDirectory = GetJournalFolder(Properties.Core.Default.JournalFolder);
var files = logDirectory.GetFiles("Journal.????????????.??.log"); var files = logDirectory.GetFiles("Journal.*.??.log");
// Read at most the last two files (in case we were launched after the game and the latest // Read at most the last two files (in case we were launched after the game and the latest
// journal is mostly empty) but keeping only the lines since the last FSDJump. // journal is mostly empty) but keeping only the lines since the last FSDJump.
List<String> lastSystemLines = new(); List<String> lastSystemLines = new();
@ -214,7 +214,7 @@ namespace Observatory
{ {
DirectoryInfo logDirectory = GetJournalFolder(path); DirectoryInfo logDirectory = GetJournalFolder(path);
journalWatcher = new FileSystemWatcher(logDirectory.FullName, "Journal.????????????.??.log") journalWatcher = new FileSystemWatcher(logDirectory.FullName, "Journal.*.??.log")
{ {
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size |
NotifyFilters.FileName | NotifyFilters.CreationTime NotifyFilters.FileName | NotifyFilters.CreationTime