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 Krishna srinivasan <ja...@yahoo.co.uk> on 2002/02/19 09:52:11 UTC
what do i do?
Hi all,
I have a small problem. I need your help guys.
Currently i have a dir structure set up like this with
some class files in each of them.
dir1 - contains class1,class2 and class3
dir2 - contains class4
dir3 - contains class5
common - contains log4j.properties
When i run dir1/class1 i need logging to be done in
say class1.log.
I could achive this by conf log4j.properties.
log4j.category.dir1.class1=info, cls1
log4j.appender.cls1=org.apache.log4j.RollingFileAppender
log4j.appender.cls1.File=logs/class1.log
When i run class1, it uses classes in other dirs too.
eg dir2/class4
Now i wud like to log messages from class4 also in
class1.log.
But when class4 runs independantly[say it is called
from the command line],
i need messages from class4 and any other class it
used to be logged to log into class4.log.
Thus when a class is called by some other class it
should log onto where
the calling class is already logging.
How do i achieve this?
This will help me analyse the flow thru the messages
logged
when class1 runs invoking methods of diff classes.
Thanks,
Krishna
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>