Zulip Chat Archive

Stream: lean4

Topic: upgrade trace class to warning or error


Matthew Ballard (Sep 03 2023 at 13:08):

Is there a mechanism by which one can globally turn on a trace class in a library and have its output upgraded to a warning or error?

Kyle Miller (Sep 03 2023 at 14:33):

It looks like docs#Lean.addTrace (the implementation of trace[...] ...) uses docs#Lean.MonadTrace but docs#Lean.log uses docs#Lean.MonadLog, so at this low level the answer is "no" (but that doesn't mean particular instances of these monads can't have what you're asking for).

Here's where the command elaborator monad turns the collected trace messages into log messages, and on the penultimate line it sets the severity to .information.


Last updated: Dec 20 2023 at 11:08 UTC