----- Original Message ----- From: "Armin Zeltner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 13, 2002 4:24 AM Subject: log4j initialization problems
> Hi > > I've the following sequence: > Category root=Category.getRoot(); > root.addAppender(new ConsoleAppender()); > Category log=Category.getInstance(XYZ.class.getName()); This by itself does not initialize log4j. You need to do a properties/XML file init or explicitly call one of the configure methods prior to trying to obtain a Category. For the simplist way, simply do : BasicConfigurator.configure(); Category log=Category.getInstance(XYZ.class.getName()); .... > ..... > log.debug("abcdef"); > > and I get the following error: > log4j:ERROR No appenders could be found for category (XYZ). > log4j:ERROR Please initialize the log4j system properly. > > > I really the initialization of root or any parent category not sufficient? > Again, simply obtaining root does not configure the log4j system. > THX > Armin > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>