Skip to content

Conversation

ericcurtin
Copy link
Collaborator

With auto by default

@ericcurtin
Copy link
Collaborator Author

@CISC @ngxson PTAL

Copy link

@Copilot Copilot AI left a 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

@ericcurtin ericcurtin force-pushed the auto-color branch 6 times, most recently from 50c698c to 09348d2 Compare September 4, 2025 21:18
@ericcurtin
Copy link
Collaborator Author

@JohannesGaessler @slaren PTAL

@ericcurtin ericcurtin force-pushed the auto-color branch 2 times, most recently from b58a0b3 to 19fcb5c Compare September 5, 2025 13:42
@ericcurtin
Copy link
Collaborator Author

All comments resolved @JohannesGaessler ready for re-review

@ericcurtin ericcurtin force-pushed the auto-color branch 2 times, most recently from 1fa4a19 to ef5855e Compare September 5, 2025 14:12
@ericcurtin
Copy link
Collaborator Author

All comments resolved again @JohannesGaessler ready for re-review

With auto by default

Signed-off-by: Eric Curtin <[email protected]>
@ericcurtin ericcurtin merged commit 408ff52 into master Sep 5, 2025
50 checks passed
@ericcurtin ericcurtin deleted the auto-color branch September 5, 2025 18:44
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
njsyw1997 pushed a commit to aizip/llama.cpp that referenced this pull request Sep 10, 2025
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.

3 participants