Pre-submission checklist
Bug Description
Summary
bootstrapMemoryCoreFull() in core/pipeline/memory-core.ts never calls initLogger(config, home). The logger remains in the bootstrapConsoleOnly() mode (console + memoryBuffer + broadcast only), so all file transports are never created — memos.log, error.log, audit.log, llm.jsonl, perf.jsonl, events.jsonl are all missing.
Root Cause
In memory-core.ts, after loadConfig(home) returns, the code proceeds directly to rootLogger.child(...) without calling initLogger(config, home) first:
// memory-core.ts line ~190
const config = configResult.config;
// ← Missing: initLogger(config, home);
const log = rootLogger.child({
channel: "core.pipeline.bootstrap",
...
});
The initLogger function (from core/logger/index.ts) is responsible for creating FileRotatingTransport instances based on config.logging.file.enabled. Without this call, the logger stays in bootstrap mode.
Meanwhile, config.logging.file.enabled is true by default (defaults.ts line 279), and the config API confirms it's set — but the transports are never instantiated.
Evidence
MEMOS_HOME/logs/ directory is empty (no log files at all)
- The config API returns
"logging": { "file": { "enabled": true } }
initLogger is exported from core/logger/index.ts but never imported or called in the pipeline bootstrap code
- The memory buffer transport works (SSE viewer shows logs), confirming the logger itself is functional — only file transports are missing
Impact
- No persistent log files for debugging
- No audit trail (audit.log)
- No LLM call history (llm.jsonl)
- No performance metrics (perf.jsonl)
- Users cannot diagnose issues from logs
Proposed Fix
Add initLogger(config, home) after config is loaded and before first log output:
const config = configResult.config;
// Initialize file transports (logs, audit, llm, perf, events).
initLogger(config, home);
const log = rootLogger.child({
channel: "core.pipeline.bootstrap",
...
});
Also add the import:
import { rootLogger, initLogger } from "../logger/index.js";
Environment
- MemOS: v2.0.20 (memos-local-plugin)
- OS: Windows 11
- Agent: Hermes Agent
Pre-submission checklist
Bug Description
Summary
bootstrapMemoryCoreFull()incore/pipeline/memory-core.tsnever callsinitLogger(config, home). The logger remains in thebootstrapConsoleOnly()mode (console + memoryBuffer + broadcast only), so all file transports are never created — memos.log, error.log, audit.log, llm.jsonl, perf.jsonl, events.jsonl are all missing.Root Cause
In
memory-core.ts, afterloadConfig(home)returns, the code proceeds directly torootLogger.child(...)without callinginitLogger(config, home)first:The
initLoggerfunction (fromcore/logger/index.ts) is responsible for creatingFileRotatingTransportinstances based onconfig.logging.file.enabled. Without this call, the logger stays in bootstrap mode.Meanwhile,
config.logging.file.enabledistrueby default (defaults.ts line 279), and the config API confirms it's set — but the transports are never instantiated.Evidence
MEMOS_HOME/logs/directory is empty (no log files at all)"logging": { "file": { "enabled": true } }initLoggeris exported fromcore/logger/index.tsbut never imported or called in the pipeline bootstrap codeImpact
Proposed Fix
Add
initLogger(config, home)after config is loaded and before first log output:Also add the import:
Environment