From 020aa325a737ad503201cf75101caa0b09c72d29 Mon Sep 17 00:00:00 2001
From: Athanasius <github@miggy.org>
Date: Wed, 1 Jun 2022 16:17:34 +0100
Subject: [PATCH] eddn: Cite event name in some logging

Not needed where we're in an event-specific function, but is in generic
event handling.
---
 plugins/eddn.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/plugins/eddn.py b/plugins/eddn.py
index bc043926..8db26469 100644
--- a/plugins/eddn.py
+++ b/plugins/eddn.py
@@ -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)