mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 21:33:41 -05:00
use app.logger.debug()
instead of print()
This commit is contained in:
parent
cac5ba5661
commit
9c9970b930
1 changed files with 4 additions and 4 deletions
|
@ -271,7 +271,7 @@ def find_emoji_path(emoji_name):
|
|||
|
||||
else:
|
||||
for address, dirs, files in os.walk(EMOJI_BASE_PATH):
|
||||
print("\n[CatAsk/functions/find_emoji_path] Falling back to scanning directories\n")
|
||||
app.logger.debug("\n[CatAsk/functions/find_emoji_path] Falling back to scanning directories\n")
|
||||
if f"{emoji_name}.png" in files:
|
||||
rel_dir = os.path.relpath(address, EMOJI_BASE_PATH)
|
||||
emoji_path = os.path.join("static/emojis", rel_dir, f"{emoji_name}.png")
|
||||
|
@ -332,7 +332,7 @@ def listEmojiPacks():
|
|||
# Check if a meta.json file exists in the directory
|
||||
meta_json_path = const.emojiPath / f"{pack_dir}.json"
|
||||
if meta_json_path.exists():
|
||||
print(f"[CatAsk/functions/listEmojiPacks] Using meta.json file ({meta_json_path})")
|
||||
app.logger.debug(f"[CatAsk/functions/listEmojiPacks] Using meta.json file ({meta_json_path})")
|
||||
# Load data from the meta.json file
|
||||
pack_data = loadJSON(meta_json_path)
|
||||
|
||||
|
@ -345,7 +345,7 @@ def listEmojiPacks():
|
|||
'emojis': pack_data.get('emojis', [])
|
||||
})
|
||||
else:
|
||||
print(f"[CatAsk/functions/listEmojiPacks] Falling back to directory scan ({pack_dir})")
|
||||
app.logger.debug(f"[CatAsk/functions/listEmojiPacks] Falling back to directory scan ({pack_dir})")
|
||||
# If no meta.json is found, fall back to directory scan
|
||||
preview_image = None
|
||||
# Find the first image in the directory for preview
|
||||
|
@ -380,7 +380,7 @@ def processEmojis(meta_json_path):
|
|||
'file_name': emoji['fileName'],
|
||||
}
|
||||
processed_emojis.append(emoji_info)
|
||||
print(f"[CatAsk/API/upload_emoji_pack] Processed emoji: {emoji_info['name']}\t(File: {emoji_info['file_name']})")
|
||||
app.logger.debug(f"[CatAsk/API/upload_emoji_pack] Processed emoji: {emoji_info['name']}\t(File: {emoji_info['file_name']})")
|
||||
|
||||
# Create the pack info structure
|
||||
pack_info = {
|
||||
|
|
Loading…
Add table
Reference in a new issue