Running Java EAR Applications

What is the best way to bind a log in an ear app. Does the application cover web applications (military files) and ejb modules? Having logback.xml in a web application, I only get logs from this application, but not from ejb modules. Do you have a few recommendations for these scenarios?

Thanks.

+6
source share
2 answers

I agree. Also, you can pack this special jar, packaged inside the lib ears catalog, exploded. Thus, you can easily modify this file.

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

+1
source

Better to keep it in one of the cans inside the ear. Ideally, you might have a special jar for internal configuration β€” your properties, Spring metadata (if any), etc .; this would be the perfect place to save logback.xml .

The same goes for the library of magazines, too - it should be shared, it’s easier to manage it like this.

0
source

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


All Articles