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 Stephane Nicoll <sn...@kiala.com> on 2002/07/24 11:41:36 UTC

Advanced questions ? (I hope)

Dear all,
 
I have actually two questions to ask. I hope this is not clearly written in
the manual. I've checked documentation and found no solution to my problems.
 
1. I would like to declare for an application different loggers. I have an
application with many objets and I would like that logs about a set of objets
goes into one log files. I assume that everything is in the way we get the
static logger in these classes but I can't figure out we can do this. More
explicitely If i have for instance a package com.foo with four objetcs (A, B,
C, D). I would lie that logs from A and C go into log1.txt and logs from B
and D go into log2.txt.
 
2. Is it possible to associated a log file to an INSTANCE of an object? I
have object which does quite complex things and which is constructed with an
Id. I would like to associate one log file per instance, such as log-id1 and
log-id2 if I do new ComplexObject("id1); and new ComplexObject("id2");
 
Thanks in advance for any help!
 
Cheers,
 
Stéphane