[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/29137] New: Logger parent not updated when new parent app
From: |
mark at gcc dot gnu dot org |
Subject: |
[Bug classpath/29137] New: Logger parent not updated when new parent appears in namespace |
Date: |
19 Sep 2006 10:05:16 -0000 |
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.
--
Summary: Logger parent not updated when new parent appears in
namespace
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: classpath
AssignedTo: mark at gcc dot gnu dot org
ReportedBy: mark at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29137
- [Bug classpath/29137] New: Logger parent not updated when new parent appears in namespace,
mark at gcc dot gnu dot org <=