Skip to content

Let debug logs follow initialized log level - #425

Draft
funwithcthulhu wants to merge 1 commit into
camlworks:masterfrom
funwithcthulhu:temp/debug-log-level
Draft

Let debug logs follow initialized log level#425
funwithcthulhu wants to merge 1 commit into
camlworks:masterfrom
funwithcthulhu:temp/debug-log-level

Conversation

@funwithcthulhu

Copy link
Copy Markdown
Contributor

Summary

  • Let sub-logs without an explicit level inherit the global Logs level instead of freezing the current Dream default at source creation time.
  • Preserve explicit per-source levels set through Dream.sub_log ~level and Dream.set_log_level.
  • Add a unit test for the Dream.debug case from the issue: the default logger is created before Dream.initialize_log ~level:Debug ()`, then debug output should be enabled.

Closes #388.

Validation

  • git diff --cached --check
  • opam exec -- dune runtest test/unit (blocked locally: this switch is missing alcotest)
  • opam exec -- ocamlformat --check ... (not run: project requires ocamlformat 0.25.1, local switch has 0.29.0)
  • opam exec -- dune build src/server/log.ml (timed out locally without a useful compiler diagnostic; stopped the leftover build process and cleared its stale _build/.lock)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

"Dream.debug" doesn't seem to be working

1 participant