Skip to content

Commit

Permalink
fix: disable backtrace in exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
qLunar committed May 18, 2024
1 parent 1196ee5 commit cdc93f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chiya/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def emit(self, record: logging.LogRecord) -> None:
discord.utils.setup_logging(handler=InterceptHandler(),level=logging.getLevelName(config["bot"]["log_level"]), root=False)

fmt = "<green>{time:YYYY-MM-DD HH:mm:ss}</green> | <level>{level: <8}</level> | <cyan>{name}</cyan> | <level>{message}</level>"
log.add(sys.stdout, format=fmt, level=log_level)
log.add(sys.stdout, format=fmt, level=log_level, backtrace=False)
log.add(os.path.join("logs", "bot.log"), format=fmt, rotation="1 day")


Expand Down

0 comments on commit cdc93f4

Please sign in to comment.