forked from Hay1tsme/artemis
add allnet request debug logging
This commit is contained in:
parent
fae6b77403
commit
101b966e3a
@ -115,6 +115,7 @@ class AllnetServlet:
|
|||||||
else:
|
else:
|
||||||
resp = AllnetPowerOnResponse2()
|
resp = AllnetPowerOnResponse2()
|
||||||
|
|
||||||
|
self.logger.debug(f"Allnet request: {vars(req)}")
|
||||||
if req.game_id not in self.uri_registry:
|
if req.game_id not in self.uri_registry:
|
||||||
msg = f"Unrecognised game {req.game_id} attempted allnet auth from {request_ip}."
|
msg = f"Unrecognised game {req.game_id} attempted allnet auth from {request_ip}."
|
||||||
self.data.base.log_event("allnet", "ALLNET_AUTH_UNKNOWN_GAME", logging.WARN, msg)
|
self.data.base.log_event("allnet", "ALLNET_AUTH_UNKNOWN_GAME", logging.WARN, msg)
|
||||||
@ -154,6 +155,7 @@ class AllnetServlet:
|
|||||||
msg = f"{req.serial} authenticated from {request_ip}: {req.game_id} v{req.ver}"
|
msg = f"{req.serial} authenticated from {request_ip}: {req.game_id} v{req.ver}"
|
||||||
self.data.base.log_event("allnet", "ALLNET_AUTH_SUCCESS", logging.INFO, msg)
|
self.data.base.log_event("allnet", "ALLNET_AUTH_SUCCESS", logging.INFO, msg)
|
||||||
self.logger.info(msg)
|
self.logger.info(msg)
|
||||||
|
self.logger.debug(f"Allnet response: {vars(resp)}")
|
||||||
|
|
||||||
return self.dict_to_http_form_string([vars(resp)]).encode("utf-8")
|
return self.dict_to_http_form_string([vars(resp)]).encode("utf-8")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user