Skip to content

Improve logging - #328

Merged
osmith42 merged 3 commits into
nickvsnetworking:masterfrom
osmith42:improve-logging
Aug 17, 2026
Merged

Improve logging#328
osmith42 merged 3 commits into
nickvsnetworking:masterfrom
osmith42:improve-logging

Conversation

@osmith42

Copy link
Copy Markdown
Collaborator
  • Add a comment for the logfiles section (as IMHO it was not obvious that this gets ignored unless the log service runs)
  • Remove the unused pyhss_logs_volume in docker-compose.yaml
  • Fix duplicate timestamps in journalctl

See individual commits for details.

@osmith42
osmith42 requested a review from Takuto88 August 11, 2026 10:30

@Takuto88 Takuto88 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this - I've just two minor things for this one.

Comment thread lib/logtool.py Outdated
Comment thread systemd/pyhss_log.service Outdated
Add a comment explaining that the logfiles section gets ignored unless
the logService job gets started (which we don't in the docker compose
and debian packaging setups).
The pyhss log service is not running in docker compose, so the
pyhss_logs volume stays empty. Remove it, so users won't assume that
something should get written there.
Introduce a new environment variable PYHSS_LOG_STDOUT_NO_TIMESTAMP, and
set it in all systemd services. In the logging code, do not print a
timestamp if it is set.

This fixes having a redundant timestamp in journalctl:
  Aug 11 11:56:53 hostname pyhss_gsup[146051]: [08/11/2026 11:56:53] [INFO] GSUP server started on 127.0.0.1:4222

I considered making this configurable via config.yaml instead of the
environment variable. But I think the env var solution is better as it
allows to set this only in the systemd service files, so we still have
the timestamps with the default config when the services are started in
another way (e.g. via docker).
@osmith42
osmith42 merged commit 372cc12 into nickvsnetworking:master Aug 17, 2026
8 checks passed
@osmith42
osmith42 deleted the improve-logging branch August 17, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants