Closed riton closed 5 months ago
When the script is launched using systemd and Journald, system logs already has informations such as hostname, pid or datetime.
systemd
Journald
Jan 16 17:54:43 THE_HOSTNAME docker-ingress-routing-daemon[1623120]: 2024-01-16.17:54:43.099254|THE_HOSTNAME|1623097| Docker Ingress Routing Daemon 4.1.1 starting ... Jan 16 17:54:43 THE_HOSTNAME docker-ingress-routing-daemon[1623135]: 2024-01-16.17:54:43.123564|THE_HOSTNAME|1623097| Detecting ingress network and node IP: Jan 16 17:54:43 THE_HOSTNAME docker-ingress-routing-daemon[1623139]: 2024-01-16.17:54:43.127176|THE_HOSTNAME|1623097| - Ingress subnet: 10.0.0.0/24 Jan 16 17:54:43 THE_HOSTNAME docker-ingress-routing-daemon[1623143]: 2024-01-16.17:54:43.130406|THE_HOSTNAME|1623097| - This node's IP: 10.0.0.2
Jan 16 18:08:42 THE_HOSTNAME docker-ingress-routing-daemon[1623972]: Docker Ingress Routing Daemon 4.1.1 starting ... Jan 16 18:08:52 THE_HOSTNAME docker-ingress-routing-daemon[1623972]: Detecting ingress network and node IP: Jan 16 18:08:52 THE_HOSTNAME docker-ingress-routing-daemon[1623972]: - Ingress subnet: 10.0.0.0/24 Jan 16 18:08:52 THE_HOSTNAME docker-ingress-routing-daemon[1623972]: - This node's IP: 10.0.0.2
@riton Thanks for submitting this pull request. This seems like a sensible improvement. I haven't tested it, but you clearly have and as the patch seems uncontroversial I will just merge. Thanks so much again.
Motivation
When the script is launched using
systemd
andJournald
, system logs already has informations such as hostname, pid or datetime.Example
Log before the patch
Log after the patch