Skip to content

Commit

Permalink
chore: update logger example
Browse files Browse the repository at this point in the history
  • Loading branch information
shengchenyang committed Jan 2, 2025
1 parent e29ed92 commit 974b2dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ayugespidertools/templates/project/module/settings.py.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from pathlib import Path

from loguru import logger
from ayugespidertools.config import logger

BOT_NAME = "$project_name"

Expand All @@ -30,6 +30,7 @@ VIT_DIR = _ / "VIT"
# Log configuration example
LOG_LEVEL = "ERROR"
LOG_FILE = _ / "logs/$project_name.log"
logger.remove()
logger.add(
_ / "logs/error.log",
level="ERROR",
Expand Down

0 comments on commit 974b2dd

Please sign in to comment.