In the following code both ab and ac should have the same parent a, but they don't: import java.util.logging.*; public class t { public static void main(String[] args) throws Exception { Logger ab = Logger.getLogger("a.b"); Logger a = Logger.getLogger("a"); Logger ac = Logger.getLogger("a.c"); System.out.println("a: " + a); System.out.println("ab parent: " + ab.getParent()); System.out.println("ac parent: " + ac.getParent()); } } ac has a as parent, but ab doesn't. This seems to be caused by the following guard in LogManager.addLogger(): * When adding "foo.bar", the logger "foo.bar.baz" should change * its parent to "foo.bar". */ if (parent != Logger.root) That if statement seems wrong.
Subject: Bug 29137 CVSROOT: /cvsroot/classpath Module name: classpath Changes by: Mark Wielaard <mark> 06/09/19 10:41:45 Modified files: . : ChangeLog java/util/logging: LogManager.java Log message: Fixes bug #29137 * java/util/logging/LogManager.java (addLogger): Always check for existing children of a new Logger. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8566&r2=1.8567 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/logging/LogManager.java?cvsroot=classpath&r1=1.23&r2=1.24
Fixed checked in and mauve test added.
Subject: Bug 29137 Author: tromey Date: Tue Sep 19 16:23:34 2006 New Revision: 117058 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117058 Log: 2006-09-19 Mark Wielaard <mark@klomp.org> Fixes bug #29137 * java/util/logging/LogManager.java (addLogger): Always check for existing children of a new Logger. 2006-09-19 Tom Tromey <tromey@redhat.com> * java/util/logging/LogManager.java: Re-merged with Classpath. Modified: trunk/libjava/ChangeLog trunk/libjava/java/util/logging/LogManager.java