Add mlog structured logging integration to relay server#306
Conversation
aae0640 to
00deb5a
Compare
Enables per-session mlog logging with configurable directory and sample rate. Generates unique log IDs combining timestamp and session pointer address.
00deb5a to
a739798
Compare
afrind
left a comment
There was a problem hiding this comment.
@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.
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:
This change is