tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48716] Embedded Tomcat JULI aggressively resetting default logging configuration
Date Sun, 22 Aug 2010 14:02:14 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48716

S. Ali Tokmen <postmaster@alishomepage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #10 from S. Ali Tokmen <postmaster@alishomepage.com> 2010-08-22 10:02:08
EDT ---
This is not fixed: Tomcat 6.0.29 and 7.0.2 still removes all handlers of all
Java loggers.

Here is the code executed by Catalina:

        // Clear the classloader reference in common-logging
        if (clearReferencesLogFactoryRelease) {
            org.apache.juli.logging.LogFactory.release(this);
        }

... which looks correct. But, JULI actually ignores the given ClassLoader and
calls:

        java.util.logging.LogManager.getLogManager().reset();

Which basically removes all handlers of all loggers of the Java util logger.
Note that the comment on JULI says it should remvoe only things from JULI, that
is UNTRUE.

The correct implementation would, I guess, look like that:

    To clean up all of the current Web application's loggers:

    get all loggers' names
    for each logger
        get all handlers
        for each handler
            if the handler's class can be loaded using the WebAppClassLoader
               AND cannot be loaded using the WebAppClassLoader's parent
            then
              remove this handler
            else don't touch
              // that logger belongs to some other application
              // or to Tomcat itself

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message