Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider automatically disabling colors in logging output at run time #1117

Open
al42and opened this issue Aug 29, 2023 · 0 comments · May be fixed by #1245
Open

Consider automatically disabling colors in logging output at run time #1117

al42and opened this issue Aug 29, 2023 · 0 comments · May be fixed by #1245
Assignees
Labels
enhancement New feature or request

Comments

@al42and
Copy link
Contributor

al42and commented Aug 29, 2023

Describe the motivation for the feature request

hipSYCL colorful debug output is great when viewed in the terminal. It's not so great when redirected to a file.

Currently, switching the colors off require rebuilding hipSYCL with HIPSYCL_DEBUG_NOCOLOR set, which is a bit inconvenient (additionally, there is no CMake support, so the compiler flags have to be tinkered with directly).

Describe the solution you'd like

Automatic detection of whether stderr/stdout is redirected based on isatty() result.

If applicable, describe alternatives you've considered

  • Checking NO_COLOR environment variable. Could be complementary to the automatic detection.
  • Leaving things the way they are.
  • For the compiler plugin, using llvm::WithColor::error and its friends might be preferred to make the output more consistent with the rest of Clang messages.
@al42and al42and added the enhancement New feature or request label Aug 29, 2023
@normallytangent normallytangent self-assigned this Oct 25, 2023
@normallytangent normallytangent linked a pull request Nov 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants