Dear all,

I want to write a logger for my project . log file for single class is
Ok . log for  multiple classes seems problem to me .  I do not want to
allocate  one logger for one class , 10 logger for 10 class. I want to
some other smart way .
There was a post in mailing list by John  ([EMAIL PROTECTED]
) . tile is   "How to use Log4J in Multiple
classes? App Design?             Date     Tue, 12 Jul 2005 23:57:43
GMT

 John Hurt wrote:
>
> > Hi,
> >
> > My application is split up into multiple classes. If I had
> > processing in
> > each class that I wanted to log, what's the best way to make a
> > reference to
> > the Logger available, so that for instance they all write to the
> > same log
> > file?
> >
> > Do I create an instance of the Logger class at the beginning of the
> > program
> > flow, then pass that class to all the methods/classes that plan to do
> > logging?
> >
> > Do I make a wrapper singleton class that has a Logger in it and all
> > code
> > refers to the wrapper class?
> >
> > Do I use a base class (or interface or abstract class) that includes a
> > reference to a Logger class?
> >
> > Anyone has generic examples where Logger is used in more than 1
> > class, how
> > to use it gracefully? Thanks.
".
that is exactly what I want . but I could not contact with him . that
email address is not working .
Could you please one if you give me good advice !!!

Best Regards
Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to