[Bug] no logging in JSON format, even when setting it in configuration #819

Closed
opened 2025-12-29 02:24:23 +01:00 by adam · 4 comments
Owner

Originally created by @akelge on GitHub (Oct 7, 2024).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I run headscale with the following config snippet:

log:
  format: json
  level: info

but logs are in text format

Expected Behavior

I expect to see logs in JSON format

Steps To Reproduce

Run headscale with log.format: json set in the configuration

Environment

- OS: not relevant
- Headscale version: 0.23.0
- Tailscale version: not relevant

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

Originally created by @akelge on GitHub (Oct 7, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior I run headscale with the following config snippet: ``` log: format: json level: info ``` but logs are in text format ### Expected Behavior I expect to see logs in JSON format ### Steps To Reproduce Run headscale with `log.format: json` set in the configuration ### Environment ```markdown - OS: not relevant - Headscale version: 0.23.0 - Tailscale version: not relevant ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [X] Headscale runs in a container ### Anything else? _No response_
adam added the bug label 2025-12-29 02:24:23 +01:00
adam closed this issue 2025-12-29 02:24:23 +01:00
Author
Owner

@akelge commented on GitHub (Oct 7, 2024):

I have checked and it appears this has been broken in 0.23.0-beta 4, beta3 still logs in json

@akelge commented on GitHub (Oct 7, 2024): I have checked and it appears this has been broken in 0.23.0-beta 4, beta3 still logs in json
Author
Owner

@badsmoke commented on GitHub (Oct 22, 2024):

I can confirm it; I was also just wondering why it wasn't logging more in json, version 0.23

@badsmoke commented on GitHub (Oct 22, 2024): I can confirm it; I was also just wondering why it wasn't logging more in json, version 0.23
Author
Owner

@sjansen1 commented on GitHub (Dec 7, 2024):

I never saw Headscale logging in files except in /var/log/syslog. From commits i can see it should log into /var/lib/headscale/headscale.log, but it does not.

@sjansen1 commented on GitHub (Dec 7, 2024): I never saw Headscale logging in files except in /var/log/syslog. From commits i can see it should log into /var/lib/headscale/headscale.log, but it does not.
Author
Owner

@badsmoke commented on GitHub (Feb 11, 2025):

unfortunately the problem still exists in version 0.24.3

i created a merge request

https://github.com/juanfont/headscale/pull/2424

@badsmoke commented on GitHub (Feb 11, 2025): unfortunately the problem still exists in version 0.24.3 i created a merge request https://github.com/juanfont/headscale/pull/2424
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#819