[GH-ISSUE #2449] Log request/responses payload #27191

Closed
opened 2026-04-22 04:14:14 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @jmformenti on GitHub (Feb 11, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2449

In order to debug low-level details during development, it would be very useful to be able to see the payload of requests and responses.
Is there a way to enable this?

Originally created by @jmformenti on GitHub (Feb 11, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2449 In order to debug low-level details during development, it would be very useful to be able to see the payload of requests and responses. Is there a way to enable this?
GiteaMirror added the feature request label 2026-04-22 04:14:14 -05:00
Author
Owner

@jaredmcqueen commented on GitHub (Feb 14, 2024):

It's using gin under the hood, so I imagine one could hook into that and set up a STDOUT logger? I haven't spent any time looking at the code but will start digging in...

<!-- gh-comment-id:1944906947 --> @jaredmcqueen commented on GitHub (Feb 14, 2024): It's using gin under the hood, so I imagine one could hook into that and set up a STDOUT logger? I haven't spent any time looking at the code but will start digging in...
Author
Owner

@lesca commented on GitHub (Mar 10, 2024):

+1 agree
I can't figure out what's wrong with the request from another app without the request payload. Good to have this! Thanks

<!-- gh-comment-id:1987168741 --> @lesca commented on GitHub (Mar 10, 2024): +1 agree I can't figure out what's wrong with the request from another app without the request payload. Good to have this! Thanks
Author
Owner

@jmorganca commented on GitHub (May 11, 2024):

Hi @jmformenti thanks for the issue! If you run Ollama with OLLAMA_DEBUG=1 ollama serve you'll see per-token debug logs. Hope this helps!

<!-- gh-comment-id:2105410056 --> @jmorganca commented on GitHub (May 11, 2024): Hi @jmformenti thanks for the issue! If you run Ollama with `OLLAMA_DEBUG=1 ollama serve` you'll see per-token debug logs. Hope this helps!
Author
Owner

@fzyzcjy commented on GitHub (Oct 1, 2024):

Hi, is there any updates? Thanks!

<!-- gh-comment-id:2385647705 --> @fzyzcjy commented on GitHub (Oct 1, 2024): Hi, is there any updates? Thanks!
Author
Owner

@mateuszdrab commented on GitHub (Feb 6, 2025):

OLLAMA_DEBUG=1 definitely helps with logging the prompts but the responses are not logged

<!-- gh-comment-id:2640212834 --> @mateuszdrab commented on GitHub (Feb 6, 2025): `OLLAMA_DEBUG=1` definitely helps with logging the prompts but the responses are not logged
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27191