This is what I get at console
log4j: Trying to find [log4j.xml] using context classloader [EMAIL PROTECTED] log4j: Trying to find [log4j.xml] using [EMAIL PROTECTED] class loader. log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). log4j: Trying to find [log4j.properties] using context classloader [EMAIL PROTECTED] log4j: Trying to find [log4j.properties] using [EMAIL PROTECTED] class loader. log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource (). log4j: Could not find resource: [null]. log4j: Hierarchy threshold set to [DEBUG]. log4j: Parsing for [root] with value=[ALL,A1]. log4j: Level token is [ALL]. log4j: Category root set to ALL log4j: Parsing appender named "A1". log4j: Parsing layout options for "A1". log4j: End of parsing for "A1". log4j: Setting property [fileName] to [C:\test\logs\test-log.xml]. log4j: Parsed "A1" options. log4j: Finished configuring. log4j:WARN No appenders could be found for logger (Tester). log4j:WARN Please initialize the log4j system properly. Tester is my test class down is my properties file # Attach appender A1 to root. Set root level to Level.DEBUG. log4j.rootLogger=ALL,A1 log4j.debug=true log4j.threshold=DEBUG #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.ttd.xx..appender.MyAppender log4j.appender.A1.layout=com.hsa.xxx.logger.util.MyLayout log4j.appender.A1.fileName=C:\\test\\logs\\test-log.xml I am not getting any more info The new hierarchy creation code is already there in the previous mail Thanks George S On 1/3/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > Oops. -Dlog4j.debug > > On 1/3/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > Add -Dlog4h.debug to the command line to get info about how it is > > trying to configure itself. > > > > On 1/3/06, George Sebastian <[EMAIL PROTECTED]> wrote: > > > Hi , > > > I want to create a new Hierarchy of loggers and I am doing something > like > > > this > > > > > > private static Hierarchy h =new Hierarchy(new RootLogger(Level.DEBUG > )); > > > Logger logger =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=DEBUG , A1 > > > log4j.debug=true > > > #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 > > > > > > And while doing so and testing I am getting warning stating no > appenders > > > appended with the logger > > > log4j not configured properly > > > > > > > > > Can some one help me to solve this > > > > > > _George Sebastian > > > > > > > > > > > > -- > > James Stauffer > > Are you good? Take the test at http://www.livingwaters.com/good/ > > > > > -- > James Stauffer > Are you good? Take the test at http://www.livingwaters.com/good/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
