Skip to content

LOG_LEVEL env variable is ignored #1942

@kri164

Description

@kri164

Describe the bug

I running gravity as systemd service. Part of unity file:

[Service]
User=gravity
Group=gravity
WorkingDirectory=/var/lib/gravity
Environment="DATA_PATH=/var/lib/gravity"
Environment="LOG_LEVEL=error"
ExecStart=/usr/bin/gravity server
StandardOutput=append:/var/log/gravity.log
StandardError=append:/var/log/gravity.err.log

Expected behavior

Log file should contain errors only. But defaul info level is used instead.

cat /var/log/gravity.log
{"level":"info","ts":1762932167.3104582,"logger":"role.etcd","msg":"starting embedded etcd","instance":"","version":"0.28.
7"}
{"level":"warn","ts":1762932167.3105087,"logger":"role.etcd","msg":"Running http and grpc server on single port. This is n
ot recommended for production.","instance":"","version":"0.28.7"}
{"level":"info","ts":1762932167.3105204,"logger":"role.etcd","msg":"configuring peer listeners","instance":"","version":"0
.28.7","listen-peer-urls":["https://0.0.0.0:2380"]}

Version and Deployment (please complete the following information):

  • Gravity version: v0.28.7
  • Deployment: systemd service (simple binary and unity file)

systemctl daemon-reload was applied after unity file edit of course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions