Skip to content

feat(logger): CST timezone logging + journald auto-detect (#1021) - #2

Open
itoywh wants to merge 1 commit into
kdaefrom
pr/1021-cst-timezone
Open

itoywh wants to merge 1 commit into
kdaefrom
pr/1021-cst-timezone

Conversation

@itoywh

@itoywh itoywh commented Jul 20, 2026

Copy link
Copy Markdown
Owner

来源

从 daeuniverse/dae 官方 PR #1021 迁移至 itoywh/kdae。

功能

  • 日志时间戳改为 CST(中国标准时间,UTC+8)
  • journald 输出自动检测

影响文件

pkg/logger/logger.go

Port from itoywh/dae PR #1021 (canonical tip b7bc9be0) onto kdae 3.0.

- pkg/logger/logger.go: emit log timestamps in CST (Asia/Shanghai with
  FixedZone fallback for minimal OpenWrt/ImmortalWrt builds that lack tzdata)
- auto-detect systemd journald capture via JOURNAL_STREAM env var and
  suppress dae's own timestamp when stdout goes to journald (but NOT when
  writing to a logfile), eliminating the double timestamp prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant