users@glassfish.java.net

Glassfish Access Log Format

From: <glassfish_at_javadesktop.org>
Date: Tue, 10 Nov 2009 08:27:31 PST

Hello folks

I've got a requirement to have the GF access logs written in the same format as my apache access logs. I started playing around with the log format on the http service, but have hit a road-block in getting a like-for-like log format to apache. My apache access log format is customised for our requirement so it's not using combined/common formats. So the GF common/combined format doesn't help me.
All I need is to get the exact formatting done. I could get all data I need. However, the double quotes surrounding most of the data is problematic to me. I've come across the following discussion and for a moment thought that stripping out the double quotes were going to be easy.
https://glassfish.dev.java.net/issues/show_bug.cgi?id=518

But it appears that's not as straightforward and peaking into DefaultAccessLogFormatterImpl.java shows it adding the double quote before and after the data element. Is there a particular reason for this? And can we have this changed to a perhaps a configurable character instead of double quotes. This is probably not an issue for most people, but when we have external tools reading access logs and when you shift from modjk loadbalancing and loose the apache access logs for GF requests it poses a problem if the external tool expects a specific format.

Given the double quote is a static final class attribute, I doubt it that I can have some thing quick and easy to get over this, but will this be considered to be configurable in any future releases or can I be pointed to any other workaround to get rid of the double quotes and include any character surrounding my data? Thanks!!

Cheers
-- Imran
[Message sent by forum member 'imranbohoran' (imranbohoran_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=371289