Side effects of cobertura

After some effort, I will finally be back cobertura for my tomcat web application . Everything seemed perfect until I passed it svn and Hudson finished his work. Without this build script, I would never (or later) discover this problem. My build script tried to move the catalina.log file to another directory, but the catalina.log file was missing. After some testing, I assume that the pure presence of cobertura.jar in the classpath (without any tools) alters the logging behavior of my tomcat.

Since I don’t test a cat or a cober, someone can confirm my observation. Are there any other side effects documented somewhere?

+3
source share
1 answer

there are log4j.properties in the jb files of the cobertura files.

If you are logging in with log4j, perhaps this file is used to register the configuration (log4j takes the first log4.properties from the class path and uses this).

you can delete this file from the lib library or make sure your logging configuration is the first in the classpath.

If you specify -Dlog4j.debug = true, then log4j will tell you which logging configuration file it uses.

+1
source

Source: https://habr.com/ru/post/1795411/


All Articles