Skip to content

[Bug]: logging.file config is read but not applied — logs always write to default /tmp/openclaw/ #67168

@Pan9hu

Description

@Pan9hu

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Seems like the file logger initializes with the default path before reading the config, and never switches.

Steps to reproduce

Config:
{
"logging": {
"file": "/home/data/logs/openclaw-gateway.log",
"level": "info"
}
}

Expected behavior

Logs written to /home/data/logs/openclaw-gateway.log

Actual behavior

Logs always written to /tmp/openclaw/openclaw-YYYY-MM-DD.log

OpenClaw version

v2026.4.14

Operating system

Ubuntu v22.04

Install method

No response

Model

opus-4.6

Provider / routing chain

openclaw -> proxy -> Claude

Additional provider/model setup details

No response

Logs, screenshots, and evidence

openclaw config validate → pass
openclaw config get logging.file → returns configured path
openclaw gateway status → shows File logs: /home/data/logs/openclaw-gateway.log
But actual log file: /tmp/openclaw/openclaw-2026-04-15.log (continuously updated)
Target directory exists and is writable

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions