users@glassfish.java.net

sane logging configuration?

From: Kristian Rink <kawazu_at_zimmer428.net>
Date: Tue, 8 Apr 2008 14:15:46 +0200

Folks;

so far our formerly tomcat-hosted applications do pretty well in
glassfish v2, however the logging thing still gives me the creeps.
That's what I found out so far:

- Using log4j works rather well, and, given a sane configuration, files
are even viewable using the glassfish administration console (that's
what we definitely want). Good. Unfortunately, log entries with
severities like DEBUG, even though correctly written to the log file,
aren't visible in the log viewer... for whichever reasons.

- Using JDK logging, information on how to correctly set this up for a
custom application seems limited. My first attempt at trying to use JDK
logging instead of log4j (the app itself uses commons-logging so
changing this is not that difficult) ended up with a bunch of XML files
dumped to domains/domain1/logs/ which, as well used to be unusable from
within the administration console. Bad.

So, two questions, hoping for an answer on at least one of them:

(a) Is there a way to make log4j seamlessly work with glassfish in
terms of being capable of reading _all_ logging output (no matter which
severity/log level) from within the administration consoles log viewer?

(b) How to correctly set up my logging.properties to make JDK logger
generate output readable to the administration console?

Thanks in advance for your patience and help,
Kristia

-- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu_at_jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)