Skip to content

Conversation

rgerganov
Copy link
Collaborator

Use GGML_LOG_DEBUG() for debug messages and configure the logger to print them only when rpc-server is started with --verbose. Make sure we log a debug message for every server function.

@rgerganov rgerganov requested a review from slaren September 20, 2025 14:06
@github-actions github-actions bot added examples ggml changes relating to the ggml tensor library for machine learning labels Sep 20, 2025
Add --verbose to rpc-server and configure the ggml logger to print debug
messages only if set. Add helper macro LOG_DBG() which does an early
check of the verbose flag before calling GGML_LOG_DEBUG().
Make sure we log a debug message for every server function.
Comment on lines 23 to 25
GGML_BACKEND_API void ggml_backend_rpc_start_server(ggml_backend_t backend, const char * endpoint,
const char * cache_dir,
const char * cache_dir, bool verbose,
size_t free_mem, size_t total_mem);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to keep this function as it is and read the verbosity level from an environment variable, for example GGML_RPC_DEBUG. The idea is to keep the API clean from verbosity/log related settings.

This way, in order to see the internal ggml-rpc debug logs, you can run:

GGML_RPC_DEBUG=1 rpc-server ... --verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants