Skip to content

Allow customizing the logger middleware source#424

Draft
funwithcthulhu wants to merge 1 commit into
camlworks:masterfrom
funwithcthulhu:temp/custom-logger-middleware
Draft

Allow customizing the logger middleware source#424
funwithcthulhu wants to merge 1 commit into
camlworks:masterfrom
funwithcthulhu:temp/custom-logger-middleware

Conversation

@funwithcthulhu
Copy link
Copy Markdown
Contributor

Summary

  • Add ?log:Dream.sub_log to Dream.logger, preserving the current dream.logger source by default.
  • Expose the same optional argument in the Mirage signature.
  • Add unit coverage using an in-memory sub_log to check which log levels the middleware calls.

Closes #413.

Validation

  • git diff --cached --check
  • opam exec -- dune build src/dream.mli
  • opam exec -- dune runtest test/unit (blocked locally: this switch is missing alcotest)
  • opam exec -- dune build src/dream.cma src/dream.cmxa (blocked locally: this switch is missing graphql-lwt)
  • opam exec -- ocamlformat --inplace ... (not run: project requires ocamlformat 0.25.1, local switch has 0.29.0)

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.

Allow customizing the logger middleware

1 participant