Feature/playground memcube log structured logs#509
Merged
CarltonXiang merged 5 commits intodevfrom Nov 21, 2025
Merged
Conversation
added 5 commits
November 20, 2025 18:43
- Replace fullwidth colon (:) with halfwidth colon (:) in all content fields - Update example file to use English UI text instead of Chinese for consistency - Ensure backend sends neutral data format for frontend i18n handling Changes: - scheduler_logger.py: Use halfwidth colon in content formatting - general_scheduler.py: Use halfwidth colon in content formatting - memos_w_scheduler.py: Replace Chinese UI text with English equivalents
Replace list(merged_target_ids)[0] with next(iter(merged_target_ids)) for better performance and readability.
- Format long lines for better readability - Align dictionary entries and function parameters - Follow project code style guidelines
tianxing02
pushed a commit
to tianxing02/MemOS
that referenced
this pull request
Feb 24, 2026
* feat: reapply structured memcube logs * refactor: replace fullwidth punctuation with halfwidth in log content - Replace fullwidth colon (:) with halfwidth colon (:) in all content fields - Update example file to use English UI text instead of Chinese for consistency - Ensure backend sends neutral data format for frontend i18n handling Changes: - scheduler_logger.py: Use halfwidth colon in content formatting - general_scheduler.py: Use halfwidth colon in content formatting - memos_w_scheduler.py: Replace Chinese UI text with English equivalents * style: fix RUF015 linter warning Replace list(merged_target_ids)[0] with next(iter(merged_target_ids)) for better performance and readability. * style: apply ruff formatting - Format long lines for better readability - Align dictionary entries and function parameters - Follow project code style guidelines * style: format server_router.py (inherited from dev branch) --------- Co-authored-by: glin1993@outlook.com <>
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
Summary: Implement structured logging for memcube events with new event types (addMessage, addMemory, updateMemory, mergeMemory, scheduleMemory). Replace simple text logs with structured JSON format containing
memcube_log_content,metadata,memcube_name, andmemory_lenfields. Use halfwidth punctuation for i18n compatibility and ensure backend sends complete data for frontend processing.Fix: N/A (feature implementation based on PRD requirements)
Docs Issue/PR: N/A
Reviewer: @CaralHsi @tangg555 @lijicode
Changes
Core Implementation
Schema Enhancement (
message_schemas.py): Added new fields for structured loggingmemcube_log_content: Array of structured content itemsmetadata: Detailed metadata for each memorymemcube_name: Display name (UserMemCube/PublicMemCube)memory_len: Count of items involved in eventEvent Creation (
scheduler_logger.py): Newcreate_event_log()method for structured eventsEvent Emission (
general_scheduler.py): Integrated structured logging in workflowsLabel Mapping (
base_scheduler.py): Normalize old labels to new event typesBackward Compatibility
log_contentfield preservedBranch Strategy
This PR is re-developed from the latest
devbranch (after commit #507) to avoid merge conflicts. The original development was on an older branch forked from commit #497, but was redone cleanly on the currentdevto ensure compatibility with recent changes (log rotation, redis_scheduler, etc.).Checklist:
I have performed a self-review of my own code | 我已自行检查了自己的代码
I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人