Bug 1190203 - Business-central: clean up logging configuration and libraries
Summary: Business-central: clean up logging configuration and libraries
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER6
: 6.1.0
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-06 16:21 UTC by Marek Winkler
Modified: 2020-03-27 20:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:02:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Additional logging libraries in deployable distributions compared to EAP 6.x distribution (6.74 KB, text/plain)
2015-03-25 10:00 UTC, Jiri Locker
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1196660 0 medium CLOSED Logging config and libs clean up for KIE Server 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1196665 0 medium CLOSED Dashbuilder: clean up logging configuration and libraries 2021-02-22 00:41:40 UTC

Internal Links: 1196660 1196665

Description Marek Winkler 2015-02-06 16:21:03 UTC
Description of problem:

business-central.war uses slf4j, but it bundles also several logging backend jars:

 WEB-INF/lib/log4j-1.2.17.jar
 WEB-INF/lib/logback-classic-1.0.9.jar
 WEB-INF/lib/logback-core-1.0.9.jar

There are also two configuration files, one of them configures a FileAppender logging into '/tmp/jbpm-form-modeler-app.log':

 WEB-INF/log4j.xml
 WEB-INF/classes/logback.xml

Most containers cope well with this situation, but EWS sometimes picks up wrong logging backend and might stop logging.

I think that there should be only slf4j-api jar bundled within business-central and logging configuration could be left on the container (not 100 % sure about this one). What do you think?

Version-Release number of selected component (if applicable):
BRMS 6.1.0 ER4

Comment 2 Petr Široký 2015-02-23 17:54:11 UTC
I was about to create a BZ to unify the logging in BC and stumbled upon this one.

I agree that we should rely on logging implementation supplied by the container as then it is way easier for users to configure the logging (no need to touch the war and config files there).

Fro WAS8, this should be already in place. Only slf4j-api + slf4j-jdk14 are bundled within the WAR. See https://github.com/droolsjbpm/kie-wb-distributions/commit/6497faf9632a9e41ffcf963bf642da4831aa1c3c

Tomcat7 WAR currently bundles logback.xml + logback jars. These should be removed and replaced by slf4j-jdk14 as Tomcat is using JUL for logging.

WebLogic WAR bundles logback.xml + logback jars. Should be replaced by slf4j-jdk14. WebLogic is using JUL too.

EAP 6.4 WAR bundles logback.xml + logback jars. EAP is using jboss-logging so we need to review this. It seems to be logging OK, but we may need to do some clean-up here too.

Comment 3 Petr Široký 2015-02-23 18:48:05 UTC
The WARs (all of them) also contain commons-logging and commons-logging-api jars. I think these should be replaced by the bridge jcl-over-slf4j.jar.

Comment 4 Maciej Swiderski 2015-02-23 18:57:02 UTC
+1 to rely on container logging as this is what brings biggest value to the administrators as usually they know how to configure it. Moreover many containers allow modification to logging level without any change in the application or restart needs.

Comment 5 Petr Široký 2015-02-24 18:09:48 UTC
Fixed for Tomcat 7, EAP 6.4, WildFly 8 and JBossAS 7 WARs. WARs were configured to rely to container logging (e.g. no logging impl is bundled within them).

Following are the individual commits in 6.2.x branch (the same was also cherry-pick into master):

Tomcat 7:
https://github.com/droolsjbpm/kie-wb-distributions/commit/96b38769573a0b044c9bfdd208573623327046f9

EAP 6.4:
https://github.com/droolsjbpm/kie-wb-distributions/commit/a908d362093f7d11ddf2504bc42a660793963e3e

WildFly 8:
https://github.com/droolsjbpm/kie-wb-distributions/commit/2df2ba669652b5c8202f4cf6272b951a747f0444

JBossAS 7:
https://github.com/droolsjbpm/kie-wb-distributions/commit/db5ca02fb3d1fb85bd382d6eaaec9386d26845f8


I also verified that the WARs are logging correctly, based on the container config. WebSphere and WebLogic WARs are next.

Comment 7 Jiri Locker 2015-03-25 10:00:44 UTC
Created attachment 1006246 [details]
Additional logging libraries in deployable distributions compared to EAP 6.x distribution

This file summarizes actual outcome of assembly changes in community repository (includes diff for all WAR components but this ticket is only targeted for business-central.war).

Generally:
- jboss-logging   - needed for hibernate
- jcl-over-slf4j  - logging bridge between commons-logging and slf4j
- slf4j-api       - the single abstract logging API used by most of our components
- slf4j-ext       - SLF4J extensions, needed for unknown reason
- slf4j-jdk14     - SLF4J binding to java.util.logging framework, that is by coincidence used by all supported containers (EWS, WAS, WLS).

WAS and WLS distributions contain all of the above. Generic distribution (targeted for EWS) excludes slf4j-api and slf4j-jdk14, that need to be placed in Tomcat lib directory.

Comment 8 Jiri Locker 2015-03-25 10:02:24 UTC
Business Central logging works on all supported containers.


Note You need to log in before you can comment on or make changes to this bug.