[PR #10635] [CLOSED] envconfig: allow OLLAMA_DEBUG to select different verbosities #39176

Closed
opened 2026-04-22 23:49:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10635
Author: @rick-github
Created: 5/9/2025
Status: Closed

Base: mainHead: debug


📝 Commits (1)

  • 198bf52 envconfig: allow OLLAMA_DEBUG to select different verbosities

📊 Changes

6 files changed (+32 additions, -9 deletions)

View changed files

📝 app/lifecycle/logging.go (+1 -1)
📝 discover/gpu.go (+1 -1)
📝 envconfig/config.go (+1 -1)
📝 llm/server.go (+2 -2)
📝 runner/llamarunner/runner.go (+10 -1)
📝 server/routes.go (+17 -3)

📄 Description

Some users are reluctant to post logs with un-redacted prompts. This PR switches OLLAMA_DEBUG from a bool to a loglevel, where the logging levels are:
0: standard logging
1: verbose logging
2: verbose logging but prompts hashed

The hashing hides the content but still allows duplicate detection - I don't know how useful this would be it seemed marginally better than a static string like "REDACTED".

The levels are meant to preserve the current meaning that everybody is used to, just adding the new value (2) for redaction.

The documentation only shows setting OLLAMA_DEBUG to 0 or 1 so this should be backwards compatible.

Fixes: #10613


🔄 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/10635 **Author:** [@rick-github](https://github.com/rick-github) **Created:** 5/9/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `debug` --- ### 📝 Commits (1) - [`198bf52`](https://github.com/ollama/ollama/commit/198bf523c5e7cee55f03687954f822b14dc81426) envconfig: allow OLLAMA_DEBUG to select different verbosities ### 📊 Changes **6 files changed** (+32 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `app/lifecycle/logging.go` (+1 -1) 📝 `discover/gpu.go` (+1 -1) 📝 `envconfig/config.go` (+1 -1) 📝 `llm/server.go` (+2 -2) 📝 `runner/llamarunner/runner.go` (+10 -1) 📝 `server/routes.go` (+17 -3) </details> ### 📄 Description Some users are reluctant to post logs with un-redacted prompts. This PR switches OLLAMA_DEBUG from a bool to a loglevel, where the logging levels are: 0: standard logging 1: verbose logging 2: verbose logging but prompts hashed The hashing hides the content but still allows duplicate detection - I don't know how useful this would be it seemed marginally better than a static string like "REDACTED". The levels are meant to preserve the current meaning that everybody is used to, just adding the new value (2) for redaction. The documentation only shows setting `OLLAMA_DEBUG` to 0 or 1 so this should be backwards compatible. Fixes: #10613 --- <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-22 23:49:39 -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#39176