You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by George Sebastian <jo...@gmail.com> on 2005/12/19 10:01:08 UTC
Defining new Hierarchy of logger
Hi ,
I want to create a new Hierarchy of loggers and I am doing something like
this
private static Hierarchy h =3D new Hierarchy(new RootLogger(Level.DEBUG));
Logger logger =3D h.getLogger (XX.class.getName());
PropertyConfigurator.configure(xxxxxx.properties);
How do i need to put in the xxxxxx.properties to add an appender to my
rootLogger ( I mean root Logger of my Hierarchy)
I added some thing like this and is not working( I mean appender is not
added to the root logger and child loggers )
log4j.rootLogger=ALL , A1
#A1
# A1 is set to be a FileAppender sending its output to
# System.out. However, only error messages and above will be printed
# in A1 because A1's threshold is set to Level.ERROR.
# The fact that the root level is set to Prority.DEBUG only influences
# log requests made to the root logger. It has no influence on the
# *appenders* attached to root.
log4j.appender.A1=com.xx.log4link.appender.MyAppender
Can some one help me to solve this
_George Sebastian