@@ -201,6 +201,7 @@ public void SetupScreenshotWatcher()
201201 {
202202 ExceptionThrown ? . Invoke ( this , new ExceptionEventArgs ( ex , "initializing screenshot watcher" ) ) ;
203203 }
204+ //DebugMessage?.Invoke(this, new($"Watching screenshot folder {screenshotWatcher.Path}"));
204205 }
205206
206207 private void ScreenshotWatcher_FolderCreated ( object sender , FileSystemEventArgs e )
@@ -303,12 +304,12 @@ public void Start()
303304 private void LogFileCreateWatcher_Created ( object sender , FileSystemEventArgs e )
304305 {
305306 string filename = e . Name ?? "" ;
306- if ( filename . Contains ( "application.log" ) )
307+ if ( filename . Contains ( "application.log" ) || filename . Contains ( "application_000.log" ) )
307308 {
308309 StartNewMonitor ( e . FullPath ) ;
309310 _accountId = 0 ;
310311 }
311- if ( filename . Contains ( "notifications.log" ) )
312+ if ( filename . Contains ( "notifications.log" ) || filename . Contains ( "notifications_000.log" ) )
312313 {
313314 StartNewMonitor ( e . FullPath ) ;
314315 }
@@ -336,6 +337,7 @@ internal void GameWatcher_NewLogData(object? sender, NewLogDataEventArgs e)
336337 var eventDate = new DateTime ( ) ;
337338 DateTime . TryParseExact ( logMessage . Groups [ "date" ] . Value + " " + logMessage . Groups [ "time" ] . Value . Split ( " " ) [ 0 ] , "yyyy-MM-dd HH:mm:ss.fff" , CultureInfo . InvariantCulture , DateTimeStyles . AssumeLocal , out eventDate ) ;
338339 var eventLine = logMessage . Groups [ "message" ] . Value ;
340+ System . Diagnostics . Debug . WriteLine ( eventLine ) ;
339341 if ( eventLine . Contains ( "Session mode: " ) )
340342 {
341343 var modeMatch = Regex . Match ( eventLine , @"Session mode: (?<mode>\w+)" ) ;
@@ -631,15 +633,15 @@ public void ProcessLogs(LogDetails target, List<LogDetails> profiles)
631633 {
632634 GameLogType logType ;
633635 // Check which type of log file this is by the filename
634- if ( logFile . Contains ( "application.log" ) )
636+ if ( logFile . Contains ( "application.log" ) || logFile . Contains ( "application_000.log" ) )
635637 {
636638 logType = GameLogType . Application ;
637639 }
638- else if ( logFile . Contains ( "notifications.log" ) )
640+ else if ( logFile . Contains ( "notifications.log" ) || logFile . Contains ( "notifications_000.log" ) )
639641 {
640642 logType = GameLogType . Notifications ;
641643 }
642- else if ( logFile . Contains ( "traces.log" ) )
644+ else if ( logFile . Contains ( "traces.log" ) || logFile . Contains ( "traces_000.log" ) )
643645 {
644646 // logType = GameLogType.Traces;
645647 // Traces are not currently used, so skip them
@@ -685,7 +687,7 @@ public List<LogDetails> GetLogDetails(string folderPath)
685687 var appLogPath = "" ;
686688 foreach ( var file in Directory . GetFiles ( folderPath ) )
687689 {
688- if ( file . EndsWith ( "application.log" ) )
690+ if ( file . EndsWith ( "application.log" ) || file . EndsWith ( "application_000.log" ) )
689691 {
690692 appLogPath = file ;
691693 break ;
@@ -840,7 +842,7 @@ private void WatchLogsFolder(string folderPath)
840842 var files = System . IO . Directory . GetFiles ( folderPath ) ;
841843 var monitorsStarted = 0 ;
842844 var monitorsCompletedInitialRead = 0 ;
843- List < string > monitoringLogs = new ( ) { "notifications.log" , "application.log" } ;
845+ List < string > monitoringLogs = new ( ) { "notifications.log" , "application.log" , "notifications_000.log" , "application_000.log" } ;
844846 foreach ( var file in files )
845847 {
846848 foreach ( var logType in monitoringLogs )
@@ -873,16 +875,16 @@ private void WatchLogsFolder(string folderPath)
873875 private LogMonitor ? StartNewMonitor ( string path )
874876 {
875877 GameLogType ? newType = null ;
876- if ( path . Contains ( "application.log" ) )
878+ if ( path . Contains ( "application.log" ) || path . Contains ( "application_000.log" ) )
877879 {
878880 newType = GameLogType . Application ;
879881 CurrentProfile = new ( ) ;
880882 }
881- if ( path . Contains ( "notifications.log" ) )
883+ if ( path . Contains ( "notifications.log" ) || path . Contains ( "notifications_000.log" ) )
882884 {
883885 newType = GameLogType . Notifications ;
884886 }
885- if ( path . Contains ( "traces.log" ) )
887+ if ( path . Contains ( "traces.log" ) || path . Contains ( "traces_000.log" ) )
886888 {
887889 newType = GameLogType . Traces ;
888890 }
0 commit comments