ExaBGP 5.0.8 ignores exabgp.log.destination from env-file and environment variables under systemd
Environment
- ExaBGP version: 5.0.8 (installed via pip)
- OS: RHEL 10
- Python: system Python 3
- Service manager: systemd
Description
When running ExaBGP under systemd, logging configuration via both:
--env-file
- environment variables
is ignored for exabgp.log.destination.
Despite explicitly setting a file destination, ExaBGP continues to log to stdout only.
Configuration
systemd unit (relevant parts)
ExecStart=/usr/local/bin/exabgp --env-file /etc/exabgp/exabgp.env /etc/exabgp/exabgp.conf
env file
[exabgp.log]
all = true
destination = /var/log/exabgp.log
level = INFO
enable = true
Reproduction steps
-
Create valid env file with log destination set to file
-
Start ExaBGP with:
exabgp --env-file /etc/exabgp/exabgp.env /etc/exabgp/exabgp.conf
-
Verify effective config:
exabgp --env-file /etc/exabgp/exabgp.env env
Expected behavior
[exabgp.log]
destination = '/var/log/exabgp.log'
all = true
ExaBGP should write logs to /var/log/exabgp.log.
Actual behavior
[exabgp.log]
destination = 'stdout'
all = false
Logs are only emitted to stdout (captured by journald), and no file is written.
Additional observations
- Using systemd
Environment= with dotted variables is not possible due to systemd restrictions
- Using underscore variants (
exabgp_log_destination) does not affect ExaBGP behavior
- Passing variables via
/usr/bin/env exabgp.log.destination=... also does not redirect logs
- File permissions and paths verified as correct
- Manual writes to the same file by the
exabgp user succeed
Impact
- Unable to use ExaBGP’s native file logging under systemd
- Forces reliance on systemd logging instead of application-level logging
- Makes log configuration inconsistent with documentation
Notes
The CLI documentation indicates that:
exabgp.log.destination = <filename>
should control file logging, but this appears to be ignored in this setup.
Unclear whether:
- env-file parsing is broken
- logging subsystem ignores file destination under systemd
- underscore environment variable mapping is incomplete
ExaBGP 5.0.8 ignores
exabgp.log.destinationfrom env-file and environment variables under systemdEnvironment
Description
When running ExaBGP under systemd, logging configuration via both:
--env-fileis ignored for
exabgp.log.destination.Despite explicitly setting a file destination, ExaBGP continues to log to
stdoutonly.Configuration
systemd unit (relevant parts)
env file
Reproduction steps
Create valid env file with log destination set to file
Start ExaBGP with:
Verify effective config:
Expected behavior
ExaBGP should write logs to
/var/log/exabgp.log.Actual behavior
Logs are only emitted to stdout (captured by journald), and no file is written.
Additional observations
Environment=with dotted variables is not possible due to systemd restrictionsexabgp_log_destination) does not affect ExaBGP behavior/usr/bin/env exabgp.log.destination=...also does not redirect logsexabgpuser succeedImpact
Notes
The CLI documentation indicates that:
should control file logging, but this appears to be ignored in this setup.
Unclear whether: