8

What is the best way to bundle logback in an ear application. The application encaspulates web applications (war files) and ejb modules? By having the logback.xml in the web application I only get logs from that application but not from the ejb modules. Is theer some best practices for this scenarios?

Thanks.

2 Answers 2

1

I agree. Also, you may package this special jar packaged inside ear's lib directory exploded. This way, you may change this file easily.

Note: If you plan to change the logback.xml files dynamically without the need to redeploy, you may insert scan="true" in logback.xml

0

It's best to keep it in one of the jars inside an ear. Ideally, you could have a special jar for internal configuration — your properties, Spring metadata (if any), etc.; that would be a perfect place to keep logback.xml as well.

Same goes for the logback library, too — it should be shared, it's easier to manage it like that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.