[PR #14106] [MERGED] add ability to turn on debug request logging #14517

Closed
opened 2026-04-13 00:56:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14106
Author: @drifkin
Created: 2/5/2026
Status: Merged
Merged: 3/20/2026
Merged by: @BruceMacD

Base: mainHead: drifkin/debug-request-logger


📝 Commits (3)

  • 31d7f66 add ability to turn on debug request logging
  • d8c434c slog formatting
  • e8ef32e Revert "slog formatting"

📊 Changes

4 files changed (+307 additions, -28 deletions)

View changed files

📝 envconfig/config.go (+25 -22)
server/inference_request_log.go (+144 -0)
📝 server/routes.go (+10 -6)
server/routes_request_log_test.go (+128 -0)

📄 Description

If OLLAMA_DEBUG_LOG_REQUESTS is set, then on server startup a temp folder will be created. Upon any inference request, the body will be logged to a file in this folder, as well as a small shell script to "replay" the request using cURL.

This is just intended for debugging scenarios, not as something to turn on normally.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14106 **Author:** [@drifkin](https://github.com/drifkin) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 3/20/2026 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `drifkin/debug-request-logger` --- ### 📝 Commits (3) - [`31d7f66`](https://github.com/ollama/ollama/commit/31d7f661193bb5e9b4b81cbf1405f3e11ce494fe) add ability to turn on debug request logging - [`d8c434c`](https://github.com/ollama/ollama/commit/d8c434c3809017d9e2eaaa7d68a4f60f192f5b37) slog formatting - [`e8ef32e`](https://github.com/ollama/ollama/commit/e8ef32e4233b5ec997aff8a02cb3927a98e0339d) Revert "slog formatting" ### 📊 Changes **4 files changed** (+307 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `envconfig/config.go` (+25 -22) ➕ `server/inference_request_log.go` (+144 -0) 📝 `server/routes.go` (+10 -6) ➕ `server/routes_request_log_test.go` (+128 -0) </details> ### 📄 Description If `OLLAMA_DEBUG_LOG_REQUESTS` is set, then on server startup a temp folder will be created. Upon any inference request, the body will be logged to a file in this folder, as well as a small shell script to "replay" the request using cURL. This is just intended for debugging scenarios, not as something to turn on normally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:56:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#14517