Checking Logback based Logging in Unit Tests

I wrote a simple post a few years ago on unit testing your logging. Checking my logs I’ve seen that it’s always been a popular post as it appears to be something that lots of people want to do.

My previous version was based on log4j and since many people have moved on to logback I thought I would update it. So here it is :-)

And that’s it.

2 thoughts on “Checking Logback based Logging in Unit Tests

  1. james

    Thank you for the great pots. What about stack traces? how can we check whether a stack trace had been logged or not?



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>