[
https://issues.apache.org/jira/browse/CXF-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528802
]
Julien DUMETIER commented on CXF-1033:
--------------------------------------
The workaround show an issue on org.apache.common.logging.LogUtils
Here is a working version :
protected static Logger createLogger(Class<?> cls, String name) {
if (loggerClass != null) {
try {
Constructor cns = loggerClass.getConstructor(String.class,
String.class);
if (name == null) {
try {
return (Logger) cns.newInstance(cls.getName(),
BundleUtils.getBundleName(cls));
} catch (InvocationTargetException ite) {
if(ite.getTargetException() instanceof
MissingResourceException) {
return (Logger) cns.newInstance(cls.getName(),
null);
} else {
throw ite;
}
}
} else {
return (Logger) cns.newInstance(cls.getName(),
BundleUtils.getBundleName(cls, name));
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
if (name == null) {
try {
return Logger.getLogger(cls.getName(),
BundleUtils.getBundleName(cls));
} catch (MissingResourceException rex) {
return Logger.getLogger(cls.getName(), null);
}
} else {
return Logger.getLogger(cls.getName(),
BundleUtils.getBundleName(cls, name));
}
}
> Migrate to another logging solution rather than java.util.logging
> -----------------------------------------------------------------
>
> Key: CXF-1033
> URL: https://issues.apache.org/jira/browse/CXF-1033
> Project: CXF
> Issue Type: New Feature
> Components: Integration
> Affects Versions: 2.0.2
> Reporter: Julien DUMETIER
> Assignee: Guillaume Nodet
> Priority: Minor
> Attachments: AbstractDelegatingLogger.java, Log4jLogger.java
>
>
> The java.util.logging output is hard to redirect to an existing logging
> solution.
> I suggest to use SLF4J or something else.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.