[
https://issues.jboss.org/browse/JBLOGGING-140?page=com.atlassian.jira.plu...
]
Philippe Marschall updated JBLOGGING-140:
-----------------------------------------
Description:
We use jboss-logging with a custom SLF4J implementation that does not implement
{{LocationAwareLogger}}. We have exception tracing on and see a {{ClassCastException}} in
{{org.jboss.logging.Slf4jLoggerProvider#getLogger(String)}} for every logger we look up.
We did some preliminary microbenchmarks and can see no differences between unconditionally
casting and catching {{Throwable}} vs an {{instanceof}}, both in cases where the check
succeeds and where is fails. Having said the class hierarchies we tested are slightly
different from actual SLF4J class hierarchies.
was:
We use jboss-logging with a custom SLF4J implementation that does not implement
{{LocationAwareLogger}}. We have exception tracing on and see a {{ClassCastException}} in
{{org.jboss.logging.Slf4jLoggerProvider#getLogger(String)}} for every logger we look up.
We did some preliminary microbenchmarks and can see no differences between unconditionally
casting and catching {{Throwable}} vs an {{instanceof}}, both in cases where the check
success. Having said the class hierarchies we tested are slightly different from actual
SLF4J class hierarchies.
Avoid ClassCastException in Slf4jLoggerProvider
-----------------------------------------------
Key: JBLOGGING-140
URL:
https://issues.jboss.org/browse/JBLOGGING-140
Project: JBoss Logging
Issue Type: Enhancement
Reporter: Philippe Marschall
Assignee: James Perkins
Priority: Major
Fix For: 3.4.1.Final
We use jboss-logging with a custom SLF4J implementation that does not implement
{{LocationAwareLogger}}. We have exception tracing on and see a {{ClassCastException}} in
{{org.jboss.logging.Slf4jLoggerProvider#getLogger(String)}} for every logger we look up.
We did some preliminary microbenchmarks and can see no differences between
unconditionally casting and catching {{Throwable}} vs an {{instanceof}}, both in cases
where the check succeeds and where is fails. Having said the class hierarchies we tested
are slightly different from actual SLF4J class hierarchies.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)