1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 00:07:14 +03:00

Add similar extra logging for localhost handler

* This also adjusts the logging in Session.auth_callback() because it
  can be called from either protocol.  Saying 'edmc://' there is
  misleading.
This commit is contained in:
Athanasius 2021-03-15 12:13:28 +00:00
parent baa86b4fbf
commit 740da49ce1

View File

@ -47,6 +47,7 @@ class GenericProtocolHandler:
"""Generate an auth event."""
self.lastpayload = url
logger.trace(f'Payload: {self.lastpayload}')
if not config.shutting_down:
logger.debug('event_generate("<<CompanionAuthEvent>>"')
self.master.event_generate('<<CompanionAuthEvent>>', when="tail")
@ -374,6 +375,7 @@ else: # Linux / Run from source
def parse(self) -> bool:
"""Parse a request."""
logger.trace(f'Got message on path: {self.path}')
url = urllib.parse.unquote(self.path)
if url.startswith('/auth'):
logger.debug('Request starts with /auth, sending to protocolhandler.event()')