Implement --log-colors with always/never/auto#15792
Merged
ericcurtin merged 1 commit intomasterfrom Sep 5, 2025
Merged
Conversation
39a7989 to
12c33c8
Compare
Collaborator
Author
12c33c8 to
a73729f
Compare
There was a problem hiding this comment.
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-colorsargument 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
Collaborator
Author
|
@JohannesGaessler @slaren PTAL |
b58a0b3 to
19fcb5c
Compare
Collaborator
Author
|
All comments resolved @JohannesGaessler ready for re-review |
JohannesGaessler
approved these changes
Sep 5, 2025
1fa4a19 to
ef5855e
Compare
Collaborator
Author
|
All comments resolved again @JohannesGaessler ready for re-review |
With auto by default Signed-off-by: Eric Curtin <[email protected]>
ef5855e to
a4358da
Compare
gabe-l-hart
added a commit
to gabe-l-hart/llama.cpp
that referenced
this pull request
Sep 5, 2025
…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)
walidbr
pushed a commit
to walidbr/llama.cpp
that referenced
this pull request
Sep 7, 2025
With auto by default Signed-off-by: Eric Curtin <[email protected]>
Nexesenex
added a commit
to Nexesenex/croco.cpp
that referenced
this pull request
Oct 26, 2025
This reverts commit 408ff52.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With auto by default