-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Implement --log-colors with always/never/auto #15792
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
Conversation
39a7989
to
12c33c8
Compare
12c33c8
to
a73729f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a --log-colors
option with three modes: always
, never
, and auto
, with auto
as the default. The auto mode intelligently detects whether colors should be enabled based on terminal capabilities and environment variables.
Key Changes
- Adds auto-detection logic for color support based on terminal type and environment variables (NO_COLOR, TERM)
- Updates the
--log-colors
argument to accept three values instead of being a boolean flag - Sets auto-detection as the default behavior for the main log instance
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
common/log.h | Adds declaration for new common_log_set_colors_auto function |
common/log.cpp | Implements auto-detection logic and initializes main log with auto-detection |
common/arg.cpp | Updates --log-colors argument parser to handle three modes with validation |
50c698c
to
09348d2
Compare
@JohannesGaessler @slaren PTAL |
b58a0b3
to
19fcb5c
Compare
All comments resolved @JohannesGaessler ready for re-review |
1fa4a19
to
ef5855e
Compare
All comments resolved again @JohannesGaessler ready for re-review |
With auto by default Signed-off-by: Eric Curtin <[email protected]>
ef5855e
to
a4358da
Compare
…upport * origin/master: Thinking model disabled assistant prefill (ggml-org#15404) Implement --log-colors with always/never/auto (ggml-org#15792) CUDA: fastdiv, launch bounds for mmvq + q8_1 quant (ggml-org#15802) tests : add --list-ops and --show-coverage options (ggml-org#15745) gguf: gguf_writer refactor (ggml-org#15691) kv-cache : fix SWA checks + disable cacheless iSWA (ggml-org#15811) model-conversion : add --embeddings flag to modelcard.template [no ci] (ggml-org#15801) chat : fixed crash when Hermes 2 <tool_call> had a newline before it (ggml-org#15639) chat : nemotron thinking & toolcalling support (ggml-org#15676) scripts : add Jinja tester PySide6 simple app (ggml-org#15756) llama : add support for EmbeddingGemma 300m (ggml-org#15798)
With auto by default Signed-off-by: Eric Curtin <[email protected]>
With auto by default Signed-off-by: Eric Curtin <[email protected]>
With auto by default