Skip to content

Conversation

@rgrinberg
Copy link
Member

Instead of maintaining a separate _build/log, we fold it into the trace and produce it by default. The trace already has a lot more valuable information than the log, so the combined information provides a better debugging experienced. Log messages also contain structured payloads, which makes them useful with automation/scripting. This is demonstrated in the changes in the tests.

Fixes #12904 except for the last point. That will come in a subsequent PR.

@rgrinberg rgrinberg force-pushed the structured-logging branch 17 times, most recently from 7327f19 to dda0900 Compare December 26, 2025 17:33
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Logging messages now accept a payload of the form: [(string * Dyn.t)
list] in addition to the message.

They are also replicated to the trace file where they structure is
preserved.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg
Copy link
Member Author

rgrinberg commented Dec 26, 2025

This PR touches a bunch of tests and logging statements in trivial ways so it's a bit of a pain to rebase. The changes are all trivial conversion from logs to events. @Alizter give this us a look-over anyhow

@rgrinberg rgrinberg merged commit ae3a0f1 into ocaml:main Dec 26, 2025
30 checks passed
@Alizter Alizter self-requested a review December 26, 2025 21:33
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.

Rationalize Logging/Tracing

1 participant