tracing-test icon indicating copy to clipboard operation
tracing-test copied to clipboard

Checking for error logs?

Open Ekleog opened this issue 5 months ago • 0 comments

Hey!

I'd like to make a very simple test: if there is any error-level logs output, then I want the test to fail. Error logs are useful to not crash production systems, but while developing (and especially writing my fuzzers), I'd really like to just be able to assert that there's none.

However, reading the documentation tracing-test seems to only provide the log contents, which in turn means there seems to be no way to panic upon a specific log level.

Is there a way to do that that I missed? If not, what would you suggest I do to assert there's no error logs in my tests? :)

Ekleog avatar Jan 30 '24 13:01 Ekleog