[jboss-jira] [JBoss JIRA] Commented: (LOGMGR-29) Support for log4j Logger.getLogger(String, LogFactory)
Elias Ross (JIRA)
jira-events at lists.jboss.org
Wed Apr 6 22:05:33 EDT 2011
[ https://issues.jboss.org/browse/LOGMGR-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594151#comment-12594151 ]
Elias Ross commented on LOGMGR-29:
----------------------------------
Sure.
We have legacy code that looks roughly like:
public class LogService extends org.apache.log4j.Logger {
/** Logger Instance */
private static LogServiceFactory factory_ = new LogServiceFactory();
public static LogService getLogService(String name) {
final Object logger = Logger.getLogger(name, factory_);
return (LogService) logger;
}
This code breaks with a class cast exception.
It deploys fine with my patch.
> Support for log4j Logger.getLogger(String, LogFactory)
> ------------------------------------------------------
>
> Key: LOGMGR-29
> URL: https://issues.jboss.org/browse/LOGMGR-29
> Project: JBoss Log Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Elias Ross
> Assignee: David Lloyd
> Attachments: 0001-Create-custom-appender-use-it-to-output-messages-if-.patch
>
>
> org.apache.log4j.Logger(String, LogFactory) does not function.
> This patch adds support using a custom Log4j appender that sends messages to JBoss's appender.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list