Bug 48583

Summary: allow format of timestamp (first column of log file) to be parameterised
Product: Log4j - Now in Jira Reporter: Michael Kyritsis <michael.kyritsis>
Component: LayoutAssignee: log4j-dev <log4j-dev>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: source code and patch for the new functionality

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