[PR #12864] [MERGED] win: use copy for subprocess logs #13984

Closed
opened 2026-04-13 00:41:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12864
Author: @dhiltgen
Created: 10/30/2025
Status: Merged
Merged: 10/30/2025
Merged by: @dhiltgen

Base: mainHead: disco_logs


📝 Commits (1)

  • b54c777 win: use copy for subprocess logs

📊 Changes

1 file changed (+17 additions, -2 deletions)

View changed files

📝 llm/server.go (+17 -2)

📄 Description

windows gets confused when we try to hand the stderr file descriptor to the subprocess children. This ensures the log output always shows up.

Prior to this change, logs would appear with the following workaround:

$env:OLLAMA_DEBUG="2"
ollama serve 2>&1 | % ToString | tee-object serve.log

🔄 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/12864 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 10/30/2025 **Status:** ✅ Merged **Merged:** 10/30/2025 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `disco_logs` --- ### 📝 Commits (1) - [`b54c777`](https://github.com/ollama/ollama/commit/b54c777215d9bf8482036838872ac2416bc28cd5) win: use copy for subprocess logs ### 📊 Changes **1 file changed** (+17 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `llm/server.go` (+17 -2) </details> ### 📄 Description windows gets confused when we try to hand the stderr file descriptor to the subprocess children. This ensures the log output always shows up. Prior to this change, logs would appear with the following workaround: ```powershell $env:OLLAMA_DEBUG="2" ollama serve 2>&1 | % ToString | tee-object serve.log ``` --- <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:41:50 -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#13984