Bug 48583 - allow format of timestamp (first column of log file) to be parameterised
Summary: allow format of timestamp (first column of log file) to be parameterised
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Layout (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 enhancement
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-20 13:52 UTC by Michael Kyritsis
Modified: 2010-01-20 13:52 UTC (History)
0 users



Attachments
source code and patch for the new functionality (7.80 KB, application/x-zip-compressed)
2010-01-20 13:52 UTC, Michael Kyritsis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kyritsis 2010-01-20 13:52:58 UTC
Created attachment 24868 [details]
source code and patch for the new functionality

The first column of the log file produced by org.apache.log4j.HTMLLayout (which is an HTML file) is currently number of milliseconds since start of the program, which is difficult for a person to mentally convert into date/time. I have looked at the source code, and it is not possible to configure any parameters to give a date/time in a readable form, so I added the necessary code to support a property "TimestampFormat"

I have attached the updated source code for both HTMLLayout.java and HTMLLayoutTest.java test class, as well as the patch output.  Please could these changes (improvements) be reviewed, and if OK incorporated into Log4j?

Thanks and regards,
Michael Kyritsis