Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
Stop showing any tracebacks in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jan 21, 2025
1 parent f0cb08f commit ede350f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion labelme_toolkit/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
@click.version_option(__version__)
def cli():
logger.remove(0)

def format_console(record: dict):
# don't show any tracebacks in the console
return "<level>{message}</level>\n"

logger.add(
sys.stderr,
level="INFO",
colorize=True,
format="<level>{message}</level>",
format=format_console,
backtrace=False,
diagnose=False,
)
Expand Down

0 comments on commit ede350f

Please sign in to comment.