1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-21 11:27:38 +03:00

monitor: Gate Commander/LoadGame TRACE on trace_on 'startup'

This commit is contained in:
Athanasius 2021-08-05 13:46:20 +01:00
parent 40b76d40cc
commit ea88a57e18
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

@ -19,7 +19,7 @@ if TYPE_CHECKING:
import tkinter
import util_ships
from config import config
from config import config, trace_on
from edmc_data import edmc_suit_shortnames, edmc_suit_symbol_localised
from EDMCLogging import get_main_logger
@ -518,6 +518,8 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
self.live = True # First event in 3.0
self.cmdr = entry['Name']
self.state['FID'] = entry['FID']
if 'startup' in trace_on:
logger.trace(f'"Commander" event, {monitor.cmdr=}, {monitor.state["FID"]=}')
elif event_type == 'loadgame':
# Odyssey Release Update 5 -- This contains data that doesn't match the format used in FileHeader above
@ -559,6 +561,9 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
if entry.get('Ship') is not None and self._RE_SHIP_ONFOOT.search(entry['Ship']):
self.state['OnFoot'] = True
if 'startup' in trace_on:
logger.trace(f'"LoadGame" event, {monitor.cmdr=}, {monitor.state["FID"]=}')
elif event_type == 'newcommander':
self.cmdr = entry['Name']
self.group = None