Skip to content
This repository was archived by the owner on Aug 7, 2026. It is now read-only.
This repository was archived by the owner on Aug 7, 2026. It is now read-only.

[Bug] logger.catch() dosn't colored error traceback #52

Description

@aiwonderland

Describe the Bug

logger.catch() in errortools.logging submodule dosn't colored error traceback.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Run '....' Run code in README:
from errortools.logging import logger

logger.info("Server started on port {}", 8080)
logger.add("app.log", rotation=10_485_760, retention=5)
with logger.catch():
    int("not a number")                     # logged + suppressed
  1. See error:
2026-05-29 10:55:43.650 | ℹ INFO     | <string>:<module>:3 - Server started on port 8080
2026-05-29 10:55:43.650 | ✘ ERROR    | base:__exit__:392 - An error has been caught in function '<module>', process '5756', thread 'MainThread'
Traceback (most recent call last):
  File "<string>", line 6, in <module>
    int('not a number')
    ~~~^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'not a number'

The Traceback has no color!

Environment

- OS: [e.g. Ubuntu 22.04, Windows 11, macOS] It's irrelevant
- Python version: [e.g. 3.10, 3.11, 3.12] It's irrelevant

  • Package version: 3.2.0

Additional Context

Nothing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions