Skip to content

ExaBGP 5.0.8 ignores exabgp.log.destination from env-file and environment variables under systemd #1378

@linecolumn

Description

@linecolumn

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:

  1. --env-file
  2. 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

  1. Create valid env file with log destination set to file

  2. Start ExaBGP with:

    exabgp --env-file /etc/exabgp/exabgp.env /etc/exabgp/exabgp.conf
    
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions