dbrgn / tracing-test

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

Checking for error logs? #34

Open Ekleog opened 10 months ago

Ekleog commented 10 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? :)

nstylo commented 1 month ago

I am looking for a similar feature. It would be great if we had introspection into the event/spans to assert for log level for instance.

threema-danilo commented 1 month ago

Hi, this would probably be resolved by #5, right?