brooklyncentral/brooklyn — pull request #415 by ahgittin (2012-12-04 23:39:16+00:00)
Title: this commit removes log4j in favour of logback

logback also uses slf4j api so it's pretty much a drop-in replacement, but with some big advantages:

- common settings can be d from files, esp those in core/src/main/resources/brooklyn/
- logging for tests is automatic (using test-support/src/main/resources/logback-tests.xml)
- your own logback.xml can just be one line -- see e.g. usage/launcher/src/main/resources/logback.xml
- if you don't have a logback, default is lots of logging, not none or errors

you can set a specific logback config file to use with:

-Dlogback.configurationFile=/path/to/config.xml

in eclipse you may have to update the maven project. and if you're not getting the logging you expect in the IDE,
make sure src/main/resources is included (in eclipse, right-click the project, the Build Path -> Configure,
then make sure all dirs are included (All) and excluded (None) -- mvn clean install should do this for you btw);

FYI you might find that the IDE logs to a file brooklyn-tests.log because it doesn't distinguish between test builds.

see http://logback.qos.ch/manual/configuration.html for more information