logger: change from warn to warning

This commit is contained in:
Hay1tsme
2023-08-08 10:17:56 -04:00
parent 2e277e7791
commit 88a1462304
42 changed files with 168 additions and 167 deletions

View File

@@ -52,7 +52,7 @@ class CxbBase:
self.logger.info(f"Login user {data['login']['authid']}")
return {"token": data["login"]["authid"], "uid": data["login"]["authid"]}
self.logger.warn(f"User {data['login']['authid']} does not have a profile")
self.logger.warning(f"User {data['login']['authid']} does not have a profile")
return {}
def task_generateCoupon(index, data1):

View File

@@ -123,13 +123,13 @@ class CxbServlet(resource.Resource):
)
except Exception as f:
self.logger.warn(
self.logger.warning(
f"Error decoding json: {e} / {f} - {req_url} - {req_bytes}"
)
return b""
if req_json == {}:
self.logger.warn(f"Empty json request to {req_url}")
self.logger.warning(f"Empty json request to {req_url}")
return b""
cmd = url_split[len(url_split) - 1]
@@ -140,7 +140,7 @@ class CxbServlet(resource.Resource):
not type(req_json["dldate"]) is dict
or "filetype" not in req_json["dldate"]
):
self.logger.warn(f"Malformed dldate request: {req_url} {req_json}")
self.logger.warning(f"Malformed dldate request: {req_url} {req_json}")
return b""
filetype = req_json["dldate"]["filetype"]

View File

@@ -33,7 +33,7 @@ class CxbReader(BaseReader):
pull_bin_ram = True
if not path.exists(f"{self.bin_dir}"):
self.logger.warn(f"Couldn't find csv file in {self.bin_dir}, skipping")
self.logger.warning(f"Couldn't find csv file in {self.bin_dir}, skipping")
pull_bin_ram = False
if pull_bin_ram:
@@ -124,4 +124,4 @@ class CxbReader(BaseReader):
int(row["easy"].replace("Easy ", "").replace("N/A", "0")),
)
except Exception:
self.logger.warn(f"Couldn't read csv file in {self.bin_dir}, skipping")
self.logger.warning(f"Couldn't read csv file in {self.bin_dir}, skipping")