logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Vasileff (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-51) ClassCastException in Category logger
Date Mon, 19 Sep 2011 01:16:09 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

John Vasileff updated LOG4J2-51:

    Attachment: 0003-remove-dangerous-logger-factory-override.patch

Attaching patch #3 in the series:

remove dangerous logger factory override

Remove LoggerContext support for custom logger factories.  All Loggers returned
by LoggerContext should be compatibile and of the same type.

In the following:

Logger getLogger(LoggerFactory factory, String name)

the returned Logger was not guaranteed to be created by the provided factory.
The value of specifying a custom logger is diminished without this guarantee.

Since only one instance of each logger exists, behavior should not be defined
by the caller of getLogger() that "wins" the race to be the one to determine
the factory used to create the logger.

> ClassCastException in Category logger
> -------------------------------------
>                 Key: LOG4J2-51
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-51
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: log4j 1.2 emulation
>            Reporter: John Vasileff
>            Priority: Blocker
>         Attachments: 0001-add-test-for-Category-when-using-a-log4j2-Logger.patch, 0002-fix-for-Category.getInstance-returning-cached-Logger.patch,
0002-fix-for-Category.getInstance-returning-cached-Logger.patch, 0003-remove-dangerous-logger-factory-override.patch
> When a Category is "created" with the same name as a previously created log4j2 Logger,
a ClassCastException occurs when calling category.l7dlog(...) and others.
> See LOG4J2-50 for additional symptoms.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message