[PR #1524] [MERGED] Send logs to stderr, rather than stdout #2163

Closed
opened 2025-12-29 03:20:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1524
Author: @juanfont
Created: 8/11/2023
Status: Merged
Merged: 8/11/2023
Merged by: @juanfont

Base: mainHead: logs-to-stderr


📝 Commits (1)

  • 043be13 Send logs to stderr, rather than stdout

📊 Changes

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

View changed files

📝 cmd/headscale/headscale.go (+1 -1)

📄 Description

We were sending the logs to stdout, rather that what seems to be the industry practice of stderr.

https://github.com/rs/zerolog#pretty-logging (our log library seems to prefer stderr)
https://www.reddit.com/r/golang/comments/jqvaft/why_does_the_log_package_always_output_to_stderr/ (go standard log sends to stderr)

But you can find other opinions, of course https://12factor.net/logs

Fixes https://github.com/juanfont/headscale/issues/1519


🔄 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/juanfont/headscale/pull/1524 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 8/11/2023 **Status:** ✅ Merged **Merged:** 8/11/2023 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `logs-to-stderr` --- ### 📝 Commits (1) - [`043be13`](https://github.com/juanfont/headscale/commit/043be13e6d7c47d1bc17e7005c983f4d89a6a489) Send logs to stderr, rather than stdout ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/headscale/headscale.go` (+1 -1) </details> ### 📄 Description We were sending the logs to stdout, rather that what seems to be the industry practice of stderr. https://github.com/rs/zerolog#pretty-logging (our log library seems to prefer stderr) https://www.reddit.com/r/golang/comments/jqvaft/why_does_the_log_package_always_output_to_stderr/ (go standard log sends to stderr) But you can find other opinions, of course https://12factor.net/logs Fixes https://github.com/juanfont/headscale/issues/1519 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:20:02 +01:00
adam closed this issue 2025-12-29 03:20:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2163