How to intercept logging messages with Quarkus for testing purposes

Viewed 1219

Quarkus newbie question: I have a class A that logs something using the default Quarkus logging framework (I believe it is jboss logging). Next I want to write a testclass for A that must be able to verify which logmessages A generated. How can I do this with Quarkus?

2 Answers

Thanks Roberto for your excellent suggestion. However, I started using the LogCaptor library (https://github.com/Hakky54/log-captor) which does an excellent job for my purposes. It just works out of the box without a lot of fuss.

Related