mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-15 04:07:29 +08:00
logger: change from warn to warning
This commit is contained in:
@@ -73,7 +73,7 @@ class ChuniBase:
|
||||
|
||||
# skip the current bonus preset if no boni were found
|
||||
if all_login_boni is None or len(all_login_boni) < 1:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"No bonus entries found for bonus preset {preset['presetId']}"
|
||||
)
|
||||
continue
|
||||
@@ -149,7 +149,7 @@ class ChuniBase:
|
||||
game_events = self.data.static.get_enabled_events(self.version)
|
||||
|
||||
if game_events is None or len(game_events) == 0:
|
||||
self.logger.warn("No enabled events, did you run the reader?")
|
||||
self.logger.warning("No enabled events, did you run the reader?")
|
||||
return {
|
||||
"type": data["type"],
|
||||
"length": 0,
|
||||
|
||||
@@ -67,7 +67,7 @@ class ChuniReader(BaseReader):
|
||||
if result is not None:
|
||||
self.logger.info(f"Inserted login bonus preset {id}")
|
||||
else:
|
||||
self.logger.warn(f"Failed to insert login bonus preset {id}")
|
||||
self.logger.warning(f"Failed to insert login bonus preset {id}")
|
||||
|
||||
for bonus in xml_root.find("infos").findall("LoginBonusDataInfo"):
|
||||
for name in bonus.findall("loginBonusName"):
|
||||
@@ -113,7 +113,7 @@ class ChuniReader(BaseReader):
|
||||
if result is not None:
|
||||
self.logger.info(f"Inserted login bonus {bonus_id}")
|
||||
else:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"Failed to insert login bonus {bonus_id}"
|
||||
)
|
||||
|
||||
@@ -138,7 +138,7 @@ class ChuniReader(BaseReader):
|
||||
if result is not None:
|
||||
self.logger.info(f"Inserted event {id}")
|
||||
else:
|
||||
self.logger.warn(f"Failed to insert event {id}")
|
||||
self.logger.warning(f"Failed to insert event {id}")
|
||||
|
||||
def read_music(self, music_dir: str) -> None:
|
||||
for root, dirs, files in walk(music_dir):
|
||||
@@ -200,7 +200,7 @@ class ChuniReader(BaseReader):
|
||||
f"Inserted music {song_id} chart {chart_id}"
|
||||
)
|
||||
else:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"Failed to insert music {song_id} chart {chart_id}"
|
||||
)
|
||||
|
||||
@@ -232,7 +232,7 @@ class ChuniReader(BaseReader):
|
||||
if result is not None:
|
||||
self.logger.info(f"Inserted charge {id}")
|
||||
else:
|
||||
self.logger.warn(f"Failed to insert charge {id}")
|
||||
self.logger.warning(f"Failed to insert charge {id}")
|
||||
|
||||
def read_avatar(self, avatar_dir: str) -> None:
|
||||
for root, dirs, files in walk(avatar_dir):
|
||||
@@ -259,4 +259,4 @@ class ChuniReader(BaseReader):
|
||||
if result is not None:
|
||||
self.logger.info(f"Inserted avatarAccessory {id}")
|
||||
else:
|
||||
self.logger.warn(f"Failed to insert avatarAccessory {id}")
|
||||
self.logger.warning(f"Failed to insert avatarAccessory {id}")
|
||||
|
||||
@@ -530,7 +530,7 @@ class ChuniItemData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(f"put_user_gacha: Failed to insert! aime_id: {aime_id}")
|
||||
self.logger.warning(f"put_user_gacha: Failed to insert! aime_id: {aime_id}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
@@ -572,7 +572,7 @@ class ChuniItemData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_user_print_state: Failed to insert! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
@@ -589,7 +589,7 @@ class ChuniItemData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_user_print_detail: Failed to insert! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
|
||||
@@ -410,7 +410,7 @@ class ChuniProfileData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(f"put_profile_data: Failed to update! aime_id: {aime_id}")
|
||||
self.logger.warning(f"put_profile_data: Failed to update! aime_id: {aime_id}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
@@ -452,7 +452,7 @@ class ChuniProfileData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_profile_data_ex: Failed to update! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
@@ -479,7 +479,7 @@ class ChuniProfileData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_profile_option: Failed to update! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
@@ -503,7 +503,7 @@ class ChuniProfileData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_profile_option_ex: Failed to update! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
@@ -527,7 +527,7 @@ class ChuniProfileData(BaseData):
|
||||
|
||||
result = self.execute(conflict)
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_profile_recent_rating: Failed to update! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
@@ -552,7 +552,7 @@ class ChuniProfileData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_profile_activity: Failed to update! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
@@ -578,7 +578,7 @@ class ChuniProfileData(BaseData):
|
||||
result = self.execute(conflict)
|
||||
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"put_profile_charge: Failed to update! aime_id: {aime_id}"
|
||||
)
|
||||
return None
|
||||
|
||||
@@ -302,14 +302,14 @@ class ChuniStaticData(BaseData):
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"update_event: failed to update event! version: {version}, event_id: {event_id}, enabled: {enabled}"
|
||||
)
|
||||
return None
|
||||
|
||||
event = self.get_event(version, event_id)
|
||||
if event is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"update_event: failed to fetch event {event_id} after updating"
|
||||
)
|
||||
return None
|
||||
@@ -506,7 +506,7 @@ class ChuniStaticData(BaseData):
|
||||
|
||||
result = self.execute(conflict)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to insert gacha! gacha_id {gacha_id}")
|
||||
self.logger.warning(f"Failed to insert gacha! gacha_id {gacha_id}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
@@ -541,7 +541,7 @@ class ChuniStaticData(BaseData):
|
||||
|
||||
result = self.execute(conflict)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to insert gacha card! gacha_id {gacha_id}")
|
||||
self.logger.warning(f"Failed to insert gacha card! gacha_id {gacha_id}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
@@ -577,7 +577,7 @@ class ChuniStaticData(BaseData):
|
||||
|
||||
result = self.execute(conflict)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to insert card! card_id {card_id}")
|
||||
self.logger.warning(f"Failed to insert card! card_id {card_id}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user