Skip to content

Add mlog structured logging integration to relay server#306

Open
akash-a-n wants to merge 1 commit into
mainfrom
feature/qlogs-mlogs
Open

Add mlog structured logging integration to relay server#306
akash-a-n wants to merge 1 commit into
mainfrom
feature/qlogs-mlogs

Conversation

@akash-a-n
Copy link
Copy Markdown
Contributor

@akash-a-n akash-a-n commented May 13, 2026

Enables per-session mlog logging with configurable directory and sample rate. Generates unique log IDs combining timestamp and session pointer address.

This is dependent on : openmoq/moxygen#209

Todo:

  • add tests
  • maybe a log rotation/clean-up strategy?

This change is Reviewable

Enables per-session mlog logging with configurable directory and sample rate.
Generates unique log IDs combining timestamp and session pointer address.
@akash-a-n akash-a-n force-pushed the feature/qlogs-mlogs branch from 00deb5a to a739798 Compare May 14, 2026 18:37
Copy link
Copy Markdown
Contributor

@afrind afrind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afrind reviewed 10 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on akash-a-n, gmarzot, michalhosna, mondain, Oxyd, peterchave, suhasHere, and TimEvens).


config.example.yaml line 79 at r1 (raw file):

logging:                    # Logging configuration (optional)
  mlog:                     # MoQ-level structured logging
    dir: "./mlog"                  # Output directory for per-session mlog files

maybe default to /tmp or something so it doesn't clutter up working dir (then we don't need .gitignore)


src/main.cpp line 91 at r1 (raw file):

  // === 2. Set up logging/observability ===
  // TODO: logging framework, log levels, structured logging

Can we unclutter main but invoking a helper to do this setup? It can return a struct with the executor/iothread pool, etc


src/config/ConfigResolver.cpp line 747 at r1 (raw file):

      if (!mlogConfig.dir.empty()) {
        std::error_code ec;
        std::filesystem::create_directories(mlogConfig.dir, ec);

I don't think config resolver should create the dirs. Do that with log setup. You can stat/whatever here if you want to pre-validate perms or something.

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.

2 participants