Take a look at http://logging.apache.org/log4j/docs/manual.html

Bascially each class should have something like the following (and it
isn't expensive)
Logger myLogger = Logger.getLogger("com.project.class");

On 11/1/05, Robert Palmer <[EMAIL PROTECTED]> wrote:
> I am trying to understand the best approach to implementing log4j on a
> Tomcat server within my application. I feel this is a pretty basic
> question so apologies if it is. I have a number of session scope beans
> and request scope beans that I want to log from.
>
> The approaches I see are:
>
> 1. simply treat each bean as separate and implement the log4j code in each.
> 2. create a new Java class that encapsulates log4j and call it.
> 3. create an application scope bean that handles log4j and log
> everything from it.
>
> How do folks implement this from the standpoint of keeping the lines of
> code for logging to a minimum and ensuring performance? How efficient is
> the statement Logger myLogger = new Logger();?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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

Reply via email to