Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

different levels and inheritance

Status
Not open for further replies.

Vinz81

Programmer
Jan 11, 2005
1
FR
Hi all,

I want to have two levels : in one file I want all the DEBUG stuff of all classes, and in another file I want only the INFO+ messages.
All my classes are in the package divData2csv. Here is the beginning of my log4j.properties file :
log4j.rootLogger=DEBUG,file_log_all
log4j.logger.myLogger=INFO,file_log_normal,A1
log4j.logger.myLogger.divData2csv=DEBUG,file_log_all


The loggers I create are for example myLogger.divData2csv.Console, myLogger.divData2csv.dumper.CSVdumper, etc.

So if I understand well the way it's working, DEBUG messages should be processed by the log4j.logger.myLogger.divData2csv Logger (which should write everything in file_log_all appender), which then pass the messages to his parent, the log4j.logger.myLogger Logger (which should write only the INFO+ messages in file_log_normal appender).
But that's not what's happening : I get all the DEBUG and INFO messages in file_log_normal appender, while I was hoping to have only the INFO.

Anybody would know how I can manage to do this ?

thanks

--
Vince
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top