users@glassfish.java.net

Re: logging best practice

From: roger.keays <roger.keays_at_ninthavenue.com.au>
Date: Mon, 18 Dec 2006 18:46:09 -0800 (PST)

Mark Hansen-3 wrote:
>
> In my experience java.util.logging is not well suited to server side
> logging within a container. You basically get one configuration for the
> entire JVM. So, unless all your Web applications can be configured
> centrally, its of no use. Am I wrong about that?
>

Glassfish seems to have a good LogManager implementation. I evaluated it's
logging wrt virtual hosts and found it easy to configure each host with a
different logging configuration. I imagine the same thing would be available
for a per-webapp basis, although someone more familiar with glassfish might
like to comment on that.

The LogManager implementation is one of the main reasons I want to move from
Tomcat to Glassfish.



> roger.keays wrote:
>
>>use java.util.logging
>>
>>
>>Mark Hansen-3 wrote:
>>
>>
>>>I'm trying to deploy a WAR that includes log4j in the WEB-INF/lib.
>>>GlassFish isn't finding it, and I understand from reading some of the
>>>blogs that this is because commons-logging is getting loaded by the
>>>System classloader is trying to instantiate the log4j classes that are
>>>on the local Web classloader.
>>>
>>>First question: I don't really understand this behavior. Is GlassFish
>>>autodetecting the use of Log4J in my webapp and trying to load the Log4J
>>>classes directly from the System classloader rather than from my Web
>>>classloader? If so, why is it designed that way? Why not just let my
>>>Web app. load the Log4J classes?
>>>
>>>Second question: What is best practice for logging in a Web app that is
>>>going to be deployed to GlassFish? I don't really like the solution of
>>>putting Log4J into the GlassFish/lib because I'd like my apps to run on
>>>an "out of the box" GlassFish (or SJSAS) install. And what if I've got
>>>different apps using different versions of Log4J?
>>>
>>>Thanks for any advice,
>>>
>>>Mark
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/logging-best-practice-tf2841649.html#a7940751
Sent from the java.net - glassfish users mailing list archive at Nabble.com.