From db77e61b7987ff1b0e824e3fa4729750daf27aaa Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Tue, 30 May 2023 21:52:21 -0400 Subject: [PATCH] allnet: add event logging --- core/allnet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/allnet.py b/core/allnet.py index 160f818..8af120b 100644 --- a/core/allnet.py +++ b/core/allnet.py @@ -216,6 +216,7 @@ class AllnetServlet: resp.uri += f"|http://{self.config.title.hostname}:{self.config.title.port}/dl/ini/{req.game_id}-{req.ver.replace('.', '')}-opt.ini" self.logger.debug(f"Sending download uri {resp.uri}") + self.data.base.log_event("allnet", "DLORDER_REQ_SUCCESS", logging.INFO, f"{Utils.get_ip_addr(request)} requested DL Order for {req.serial} {req.game_id} v{req.ver}") return self.dict_to_http_form_string([vars(resp)]) def handle_dlorder_ini(self, request: Request, match: Dict) -> bytes: @@ -226,6 +227,7 @@ class AllnetServlet: if path.exists(f"{self.config.allnet.update_cfg_folder}/{req_file}"): self.logger.info(f"Request for DL INI file {req_file} from {Utils.get_ip_addr(request)} successful") + self.data.base.log_event("allnet", "DLORDER_INI_SENT", logging.INFO, f"{Utils.get_ip_addr(request)} successfully recieved {req_file}") return open( f"{self.config.allnet.update_cfg_folder}/{req_file}", "rb" ).read()