From: Jonathan M. <jma...@al...> - 2005-03-16 22:18:38
|
Hello, I wanted to set a DateFormat to match the default Apache Log format - ie: [Wed Mar 16 16:51:13 2005] [notice] Apache/2.0.52 ... This will help Log4perl messages from my mod_perl app blend in with the rest of the server log. But the 3 digit forms for Weekday and Month don't seem to work. ( As a side note, the docs say: DATE "dd MMM yyyy HH:mm:ss,SSS" "06 Nov 1994 15:49:37,459" While using that format 'Nov' actually appears with the full month name... ) Based on the log4j description (but not the examples) I think it should be: E = W EE = We EEE = Wed EEEE+ = Wednesday M = 3 MM = 03 MMM = Mar MMMM+ = March Attached are two patches. The first to enable the short forms, and the second to add a predefined APACHE format. (the second is optional, feel free to ignore it). Feedback is welcome, (but please cc me as I'm not currently subscribed) ~Jonathan |