dbrgn / tracing-test

Access and evaluate tracing logs in async and sync tests.
Apache License 2.0
52 stars 26 forks source link

Checking for error logs? #34

Open Ekleog opened 5 months ago

Ekleog commented 5 months ago

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? :)