mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-15 12:17:28 +08:00
logger: change from warn to warning
This commit is contained in:
@@ -112,7 +112,7 @@ class PokkenServlet(resource.Resource):
|
||||
try:
|
||||
pokken_request.ParseFromString(content)
|
||||
except DecodeError as e:
|
||||
self.logger.warn(f"{e} {content}")
|
||||
self.logger.warning(f"{e} {content}")
|
||||
return b""
|
||||
|
||||
endpoint = jackal_pb2.MessageType.DESCRIPTOR.values_by_number[
|
||||
@@ -123,7 +123,7 @@ class PokkenServlet(resource.Resource):
|
||||
|
||||
handler = getattr(self.base, f"handle_{endpoint}", None)
|
||||
if handler is None:
|
||||
self.logger.warn(f"No handler found for message type {endpoint}")
|
||||
self.logger.warning(f"No handler found for message type {endpoint}")
|
||||
return self.base.handle_noop(pokken_request)
|
||||
|
||||
self.logger.info(f"{endpoint} request from {Utils.get_ip_addr(request)}")
|
||||
@@ -157,7 +157,7 @@ class PokkenServlet(resource.Resource):
|
||||
None,
|
||||
)
|
||||
if handler is None:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"No handler found for message type {json_content['call']}"
|
||||
)
|
||||
return json.dumps(self.base.handle_matching_noop()).encode()
|
||||
|
||||
@@ -45,6 +45,6 @@ class PokkenItemData(BaseData):
|
||||
|
||||
result = self.execute(conflict)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to insert reward for user {user_id}: {category}-{content}-{item_type}")
|
||||
self.logger.warning(f"Failed to insert reward for user {user_id}: {category}-{content}-{item_type}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
@@ -273,7 +273,7 @@ class PokkenProfileData(BaseData):
|
||||
|
||||
result = self.execute(conflict)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to insert pokemon ID {pokemon_id} for user {user_id}")
|
||||
self.logger.warning(f"Failed to insert pokemon ID {pokemon_id} for user {user_id}")
|
||||
return None
|
||||
return result.lastrowid
|
||||
|
||||
@@ -289,7 +289,7 @@ class PokkenProfileData(BaseData):
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to add {xp} XP to pokemon ID {pokemon_id} for user {user_id}")
|
||||
self.logger.warning(f"Failed to add {xp} XP to pokemon ID {pokemon_id} for user {user_id}")
|
||||
|
||||
def get_pokemon_data(self, user_id: int, pokemon_id: int) -> Optional[Row]:
|
||||
pass
|
||||
@@ -319,7 +319,7 @@ class PokkenProfileData(BaseData):
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to record match stats for user {user_id}'s pokemon {pokemon_id} (type {match_type.name} | result {match_result.name})")
|
||||
self.logger.warning(f"Failed to record match stats for user {user_id}'s pokemon {pokemon_id} (type {match_type.name} | result {match_result.name})")
|
||||
|
||||
def put_stats(
|
||||
self,
|
||||
@@ -345,7 +345,7 @@ class PokkenProfileData(BaseData):
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to update stats for user {user_id}")
|
||||
self.logger.warning(f"Failed to update stats for user {user_id}")
|
||||
|
||||
def update_support_team(self, user_id: int, support_id: int, support1: int = None, support2: int = None) -> None:
|
||||
if support1 == 4294967295:
|
||||
@@ -363,4 +363,4 @@ class PokkenProfileData(BaseData):
|
||||
|
||||
result = self.execute(sql)
|
||||
if result is None:
|
||||
self.logger.warn(f"Failed to update support team {support_id} for user {user_id}")
|
||||
self.logger.warning(f"Failed to update support team {support_id} for user {user_id}")
|
||||
|
||||
Reference in New Issue
Block a user