Plutonomicon / plutarch-plutus

Typed eDSL for writing UPLC /ˈpluː.tɑːk/
MIT License
123 stars 63 forks source link

Log levels #672

Closed kozross closed 3 months ago

kozross commented 3 months ago

This adds the ability to specify a log level as well as a tracing mode, both at compile time for scripts, and also when injecting traces into generated code. By doing this, we can log 'different amounts' at the same time (for example, an error code at info level, but a much bigger message at debug level).

Currently, we don't test this new functionality: to ensure CI passes, deprecation warnings have been disabled for the relevant test module, but this needs to be rewritten if this functionality turns out to be beneficial.

kozross commented 3 months ago

@SeungheonOh - I don't think so either, but @peter-mlabs is the best judge of this.

peter-mlabs commented 3 months ago

I think configurable log levels would be a nice-to-have, but not essential.

peter-mlabs commented 3 months ago

Can we also add pretty and eq instances for Config here?

kozross commented 3 months ago

Eq I can add, but Pretty isn't something we use very much in general in Plutarch.