Skip to content

Tracers log level improvements #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2025

Conversation

dschrempf
Copy link
Collaborator

@dschrempf dschrempf commented May 22, 2025

Closes #662.

Support tracers with custom log levels

  • Use the machinery to suppress some known traces in tests.
  • The tests are now trace-free (but we do still show quite some other putStrLn log messages).

Track and return maximum log level of traces

  • withTracer... functions now track and return maximum log level.
  • Remove mkTracer function to encourage common usage pattern.
  • Remove withTracerQ because it is handled by polymorphic withTracerStdOut.
  • We must not "squelch" traces anymore, because we possibly have to ammend the max log level.

Tasks

  • Test tracking of max log level.
  • Test custom log levels (we can do that now by degrading an error, and checking the max log level after the run).
  • Remove Quiet.
  • Reintroduce squelch (speed).
  • Use non-emitting report function in tests.
  • -v0 flag in clients?

@dschrempf dschrempf force-pushed the dom/662-tracers-log-level-improvements branch 5 times, most recently from 4ba55e4 to 72f2512 Compare May 22, 2025 11:32
@dschrempf dschrempf marked this pull request as ready for review May 22, 2025 12:00
@dschrempf
Copy link
Collaborator Author

I also consider this PR ready to be merged, but I took some design decisions you may disagree with @edsko.

Copy link
Collaborator

@edsko edsko left a comment

Choose a reason for hiding this comment

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

Feel free to merge once the changes we discussed are done.

@dschrempf dschrempf force-pushed the dom/662-tracers-log-level-improvements branch 2 times, most recently from 37c5f8f to b0bcdea Compare May 23, 2025 08:49
dschrempf added 2 commits May 23, 2025 10:54
Part 1 of #662.

Suppress some known traces in tests, but there are problems. In particular, in
Template Haskell and Pretty Printing tests, we only have access to `String`
traces and so can not discriminate between traces of interest, and known,
unimportant traces we want to suppress.
@dschrempf dschrempf force-pushed the dom/662-tracers-log-level-improvements branch from b0bcdea to 3f89083 Compare May 23, 2025 08:54
@dschrempf dschrempf merged commit c1d4a85 into main May 23, 2025
13 checks passed
@dschrempf dschrempf deleted the dom/662-tracers-log-level-improvements branch May 23, 2025 09:11
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.

Improvements to tracing infrastructure
2 participants