[PR #11514] feat: add environment variable that allow user to disable gin default logging middleware #18835

Open
opened 2026-04-16 06:48:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11514
Author: @ffais
Created: 7/24/2025
Status: 🔄 Open

Base: mainHead: disable-gin-logging


📝 Commits (1)

  • 1f93eed feat: add environment variable that allow user to disable gin default logging middleware

📊 Changes

3 files changed (+22 additions, -5 deletions)

View changed files

📝 cmd/cmd.go (+1 -0)
📝 envconfig/config.go (+5 -0)
📝 server/routes.go (+16 -5)

📄 Description

Allows the user to disable through an environment variable the GIN logging middleware, which logs every request by default.

This is very useful if ollama is exposed through a reverse proxy that already logs all requests, or to avoid filling ollama logs with requests from health checks.

It might also fix this issue #3197.


🔄 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/11514 **Author:** [@ffais](https://github.com/ffais) **Created:** 7/24/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `disable-gin-logging` --- ### 📝 Commits (1) - [`1f93eed`](https://github.com/ollama/ollama/commit/1f93eed6c8ac8af269d03377a6f9dd75e4db835f) feat: add environment variable that allow user to disable gin default logging middleware ### 📊 Changes **3 files changed** (+22 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+1 -0) 📝 `envconfig/config.go` (+5 -0) 📝 `server/routes.go` (+16 -5) </details> ### 📄 Description Allows the user to disable through an environment variable the GIN logging middleware, which logs every request by default. This is very useful if ollama is exposed through a reverse proxy that already logs all requests, or to avoid filling ollama logs with requests from health checks. It might also fix this issue #3197. --- <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-16 06:48:30 -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#18835