mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 00:30:33 +03:00
eddn: Cite event name in some logging
Not needed where we're in an event-specific function, but is in generic event handling.
This commit is contained in:
parent
9fd3c3852a
commit
020aa325a7
@ -1707,30 +1707,31 @@ def journal_entry( # noqa: C901, CCR001
|
||||
# CarrierJump Y Y Y
|
||||
|
||||
if 'SystemAddress' not in entry:
|
||||
logger.warning("journal schema event doesn't contain SystemAddress when it should, aborting")
|
||||
logger.warning(f"journal schema event({entry['event']}) doesn't contain SystemAddress when it should, "
|
||||
"aborting")
|
||||
return "No SystemAddress in event, aborting send"
|
||||
|
||||
# add mandatory StarSystem and StarPos properties to events
|
||||
if 'StarSystem' not in entry:
|
||||
if this.systemaddress is None or this.systemaddress != entry['SystemAddress']:
|
||||
logger.warning("event has no StarSystem, but SystemAddress isn't current location")
|
||||
logger.warning(f"event({entry['event']}) has no StarSystem, but SystemAddress isn't current location")
|
||||
return "Wrong System! Delayed Scan event?"
|
||||
|
||||
if not system:
|
||||
logger.warning("system is falsey, can't add StarSystem")
|
||||
logger.warning(f"system is falsey, can't add StarSystem to {entry['event']} event")
|
||||
return "system is falsey, can't add StarSystem"
|
||||
|
||||
entry['StarSystem'] = system
|
||||
|
||||
if 'StarPos' not in entry:
|
||||
if not this.coordinates:
|
||||
logger.warning("this.coordinates is falsey, can't add StarPos")
|
||||
logger.warning(f"this.coordinates is falsey, can't add StarPos to {entry['event']} event")
|
||||
return "this.coordinates is falsey, can't add StarPos"
|
||||
|
||||
# Gazelle[TD] reported seeing a lagged Scan event with incorrect
|
||||
# augmented StarPos: <https://github.com/EDCD/EDMarketConnector/issues/961>
|
||||
if this.systemaddress is None or this.systemaddress != entry['SystemAddress']:
|
||||
logger.warning("event has no StarPos, but SystemAddress isn't current location")
|
||||
logger.warning(f"event({entry['event']}) has no StarPos, but SystemAddress isn't current location")
|
||||
return "Wrong System! Delayed Scan event?"
|
||||
|
||||
entry['StarPos'] = list(this.coordinates)
|
||||
|
Loading…
x
Reference in New Issue
Block a user