Repository navigation
Conversation
The Knowledge logger produced UTC via toISOString() with no timezone marker, while MemoryCore's gateway logger uses local time with an explicit offset (nowLocalIso, gateway/server.ts). Cross-service incident correlation required mental offset conversion with no in-band hint. Timezone configurability was already accepted for the core service in TencentCloud#75/TencentCloud#87 via TencentCloud#129, but that change predates the MemoryKnowledge module — its 15 files contain nothing under MemoryKnowledge/. Align the Knowledge logger with the same local-time ISO 8601 format. Addresses the first item of TencentCloud#1264
yangjj-iso
approved these changes
Sep 6, 2026
yangjj-iso
left a comment
Collaborator
There was a problem hiding this comment.
未发现生产代码层面的阻塞性问题,logger.ts 的实现与 MemoryCore 的既有格式一致,且 dayjs 已是运行时依赖。
Collaborator
|
done |
1 of 4 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description | 描述
Addresses the first item of #1264 (Knowledge logger timezone).
MemoryKnowledge/src/logger.tsproduced UTC timestamps viatoISOString()with no timezone marker (2026-09-05 08:16:21.677), while MemoryCore's gateway logger uses local time with an explicit offset (nowLocalIso,2026-09-05T16:16:21.677+08:00). Correlating an incident across the two services required mental offset conversion with no in-band hint.Timezone-configurable output was already accepted for the core service in #75 / #87 via #129, but that change predates the MemoryKnowledge module — its 15 changed files contain nothing under
MemoryKnowledge/, andlogger.tsstill usedtoISOString()on HEAD.Change:
ts()now uses the same local-time ISO 8601 format as MemoryCore (dayjs().format("YYYY-MM-DDTHH:mm:ss.SSSZ")), which stays ISO 8601 compliant and round-trippable while matching what an operator sees intmux/tail -f.dayjsis already a MemoryKnowledge dependency.Scope note: this PR intentionally covers only the timezone item. The other two observations in #1264 (the
LOG_PATHdefault deactivating file rotation off-container, and the console logger having no level filter) involve deployment-shape and configuration-surface decisions and are left for a separate change.Related Issue | 关联 Issue
Addresses #1264 (item 1)
Change Type | 修改类型
Self-test Checklist | 自测清单
Additional Notes | 其他说明
src/logger.test.tsasserts the emitted line matches local-time ISO 8601 with an explicit offset; it fails against the old bare-UTC format and passes after the change.npm run build(tsdown) passes.MemoryKnowledge依赖安装在本机用--ignore-scripts(无 Visual Studio C++ workload,原生模块跳过);logger 路径不依赖原生模块。