fix(logging): initialize logger from config in the standalone bridge#1955
Open
chiefmojo wants to merge 1 commit into
Open
fix(logging): initialize logger from config in the standalone bridge#1955chiefmojo wants to merge 1 commit into
chiefmojo wants to merge 1 commit into
Conversation
The MemOS daemon (`bridge.cts`) resolved config inside `bootstrapMemoryCoreFull` but never called `initLogger`, so the active logger stayed on the `bootstrapConsoleOnly()` default with `tz` pinned to "UTC". This made `logging.timezone` (PR MemTensor#44) inert in the daemon — and the rest of `logging.*` (level, channels, file/audit/llm/perf/events sinks) dead too. Pretty/compact timestamps kept printing UTC regardless of config. Add an opt-in `initLogging` flag to `BootstrapOptions`. When set, `bootstrapMemoryCoreFull` calls `initLogger(config, home)` right after config resolution, before anything logs. The standalone bridge passes it; embedded plugin hosts (`adapters/openclaw/index.ts`) leave it off so the host keeps control of its own logging. Test: bootstrap with `logging.timezone` set + `initLogging: true` stamps records with the configured tz; without the flag the logger is untouched.
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.
Problem
The standalone bridge (
bridge.cts) callsbootstrapMemoryCoreFullwithout passinginitLogging: true. The logger stays on its bootstrap-console default, ignoringconfig.logging.*entirely. In practice this meanslogging.timezonehas no effect when running as a daemon — logs are always stamped UTC regardless of config.Fix
Add
initLogging: trueto thebootstrapMemoryCoreFullcall inbridge.cts. The non-daemon stdio path (bridge/stdio.ts) already passes this flag correctly; this aligns the daemon path.