Bug 1143005
| Summary: | org.apache.commons.logging prints FATAL message as ERROR message | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Spolti <fspolti> | ||||
| Component: | Logging | Assignee: | James Perkins <jperkins> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Nikoleta Hlavickova <nziakova> | ||||
| Severity: | medium | Docs Contact: | Russell Dickenson <rdickens> | ||||
| Priority: | unspecified | ||||||
| Version: | 6.3.0 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-10-15 16:49:25 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
This is the expected behavior. We use org.slf4j:jcl-over-slf4j for apache-commons-logging. That translates FATAL to ERROR as slf4j doesn't have a FATAL level. I forgot to note that if we want to change this we'll have to create a new project to implement apache-commons-logging over the jboss-logmanager. It is something I'd consider if we have users and/or customers that would require this change. Per jcl-over-sfl4j FATAL is mapped to error, https://github.com/qos-ch/slf4j/blob/master/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLocationAwareLog.java#L32. Since there is no real upstream JIRA as this would require a new project, if proper level matching is desired please file an EAP7 feature request. |
Created attachment 938560 [details] Maven based example. Description of problem: When using org.apache.commons.logging the fatal messages are printed as a ERROR message. Version-Release number of selected component (if applicable): Java version: ava version "1.7.0_55" OpenJDK Runtime Environment (rhel-2.4.7.1.el6_5-x86_64 u55-b13) OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode) How reproducible: Use a fresh installation of EAP 6.3 and deploy an simple application using the org.apache.commons.logging.Log to log events. Ex: rivate static final Log log = LogFactory.getLog(HomeController.class); log.fatal("Logging - Logging - This is a fatal message, a high level message error."); log.error("Logging - This is a error message."); Steps to Reproduce: 1. Install the EAP 6.3 2. Deploy a simple application that logging FATAL and ERROR events. Actual results: 13:47:48,567 ERROR [org.jboss.HomeController] (http-/127.0.0.1:8080-1) Logging - Logging - This is a fatal message, a high level message error. 13:47:48,567 ERROR [org.jboss.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a error message. Expected results: 13:47:48,567 FATAL [org.jboss.HomeController] (http-/127.0.0.1:8080-1) Logging - Logging - This is a fatal message, a high level message error. 13:47:48,567 ERROR [org.jboss.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a error message. Additional info: Using log4j all messages are printed correctly. 14:08:45,545 FATAL [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Log4j - This is a fatal message, a high level message error. 14:08:45,545 ERROR [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Log4j - This is a error message. 14:08:45,560 WARN [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Log4j - This is a warning message. 14:08:45,560 INFO [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Log4j - This is a information message. 14:08:45,561 DEBUG [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Log4j - This is a debug message. 14:08:45,561 TRACE [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Log4j - This is a trace message, very detailed messages. Logging: 14:08:45,561 ERROR [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a fatal message, a high level message error. 14:08:45,561 ERROR [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a error message. 14:08:45,561 WARN [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a warn message. 14:08:45,561 INFO [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a info message. 14:08:45,561 DEBUG [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a debug message. 14:08:45,561 TRACE [org.jboss.logging.test.HomeController] (http-/127.0.0.1:8080-1) Logging - This is a trace message, very detailed messages. I've attached the source code that I used in the example above.