This repository shows an example of how to setup unit tests for logging. Sometimes unit testing log statements is required when the logging is a business requirement.
For a more extensive explanation, see http://3ldn.nl/2017/02/18/unit-testing-log-statements/