Skip to content

Print colored exception tracebacks in interactive terminals#393

Open
bobokvsky wants to merge 2 commits into
masterfrom
feat/colored-exception-tracebacks
Open

Print colored exception tracebacks in interactive terminals#393
bobokvsky wants to merge 2 commits into
masterfrom
feat/colored-exception-tracebacks

Conversation

@bobokvsky

@bobokvsky bobokvsky commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Enable ANSI-colored traceback-with-variables output when datapipe logs pipeline exceptions in an interactive terminal.
  • Split error logging into a short logger.error header and a separate traceback body written directly to stderr, so escape codes are not lost inside the logging formatter.
  • Keep plain-text behavior in non-TTY environments (CI, redirected logs): when supports_ansi(sys.stderr) is false, the traceback is still logged via logger.error as before.

Also:

  • Route datapipe CLI logging through RichHandler when stderr supports ANSI.
  • Pipeline step logs (datapipe.compute, datapipe.step.*) are colored in the terminal.
  • Plain-text logging is preserved for CI and non-TTY output.
image image

@elephantum

Copy link
Copy Markdown
Contributor

@bobokvsky тут случились конфликты

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants