By reading the logbook manual, in the configuration section , it says that it looks for the following configuration, in order:
Why is the -test
suffix? For me just having logback.xml makes sense. Why do I have to name the file?
By reading the logbook manual, in the configuration section , it says that it looks for the following configuration, in order:
Why is the -test
suffix? For me just having logback.xml makes sense. Why do I have to name the file?
Unit tests typically include the entire project in the classpath, including configuration files, including logback.xml
.
The unit test logging settings typically differ from the project logging configuration for production. A simple way to resolve this is to place the logback-test.xml
file in the unitpath classpath. So, Logback will know when to choose the correct configuration file and the name will make it clear if you are using the production ( logback.xml
) or the test ( logback-test.xml
).