I just implemented this over the weekend.

Still not totally sure what I am doing, but I do have all my classes
outputting to a log file I have specified.  I went with a simple approach
creating a reference to a Logger object in each class (I have an external
properties file supplying all the config options). My problem is
everything ends up in one giant file and it is hard to interpret.

I am now thinking about having each class create and configure a logger
object and write to its own file. One log per class.

The good thing is it is log4j is easy to set up and start logging with.

Here is the tutorial I got started with:

http://www.developer.com/open/article.php/10930_3097221_1

HTH

Luke


> Hi everyone
> Im looking for some tips on implementing a logging system in tomcat.  Ive
> got log4j installed and am about to write code but im just looking for
> some tips before i get started.  My idea is to write a central logger
> class for my app that imports the log4j package and supplys static methods
> to my app but I don't know if thats a bad idea?
>
> thanks
> -B
>



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

Reply via email to