Mike, Mark,....

Sorry for the delay.  I am on a course down in San Fran.  I'll review the
code tonight and send my comments tomorrow,

Cheers,

Brad

Brad Marlborough
ThoughtWorks, Inc. -- The art of heavy lifting(SM)
http://www.thoughtworks.com


                                                                                       
                                                
                      Mark Womack                                                      
                                                
                      <mwomack@bevocal.        To:       'Log4J Developers List' 
<[EMAIL PROTECTED]>                        
                      com>                     cc:                                     
                                                
                                               Subject:  RE: [SUBMIT] Timezone support 
for date elements of pattern layout             
                      07/15/2002 03:42                                                 
                                                
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      "Log4J Developers                                                
                                                
                      List"                                                            
                                                
                                                                                       
                                                
                                                                                       
                                                




Mike, I meant to send a reply earlier today.  I will review your changes
later tonight and let you know what I think.  Brad and Ceki should review
the changes too (right guys?) since it touches LF5 and other code areas.

I have to say that you appear to have a very complete set of changes, just
based on this email.  And you did go all out on the test cases.  I know the
test cases were probably a learning experience and a chore.  But with good
test cases, it makes it that much easier to accept changes/submissions of
this magnitude.  We can test the changes, look at the test cases, and probe
any possible problems.  It is much appreciated!  I wish more changes had
test cases submitted with them.

I am assuming these changes will be going into 1.3?  Or are we looking to
include them in a version of 1.2?  Has there been any discussion of this?

-Mark

> -----Original Message-----
> From: Michael A. McAngus [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 13, 2002 10:57 PM
> To: Log4J Developers List
> Subject: Re: [SUBMIT] Timezone support for date elements of pattern
> layout
>
>
> [EMAIL PROTECTED]  wrote:
>
> [snip]
>
> >If you have the time and gumption, test cases to test the
> changes would be
> >useful as well.  I can help you get started on that if you need it.
> >
>
> Such a simple request; yet, because of it, I've spent much of
> my recent
> free time learning about Ant and JUnit, and writing test cases.
> I hope my current submission meets with either acceptance or
> rejection
> (I don't know how much longer I can keep looking at these classes).
>
> I've attached a Zip file which should stop my brain-dead
> email program
> from adding the source files in line.
>
> The zip contains the following modified source files:
> o.a.l.helpers.AbsoluteTimeDateFormat
>   -  Modified to use Locale-specific decimal separator
> between seconds
> and milliseconds.  This was my original intent back in late
> May/early June.
>   -  Added protected method getFormatString() which returns either
> "HH:mm:ss,SSS" or "HH:mm:ss.SSS" depending on the Locale-specific
> decimal separator.
>   -  Added setLocale(Locale) method.
>   -  Added setDecimalSeparator(String) to allow the user to
> specify the
> decimal separator.
>   -  Added unsetDecimalSeparator() to revert decimal
> separator back to
> Locale-specific character.
>   -  Deprecated AbsoluteTimeDateFormat(TimeZone)
>
> o.a.l.helpers.DateTimeDateFormat
>   -  Modified format to match changes made in
> ISO8601DateFormat.  Now,
> these subclasses of AbsoluteTimeDateFormat create their date/time
> strings in a very similar manner.
>   -  Implemented the parse(String, ParsePosition) method to
> facilitate
> changes required by LogFactor5 (LF5).
>   -  Deprecated DateTimeDateFormat(TimeZone)
>
> o.a.l.helpers.ISO8601DateFormat
>   -  Calls the super class to get the time portion of the date/time
> format that is logged, rather than copying the code from
> AbsoluteTimeDateFormat.format().
>   -  Builds the date portion of the date/time string at most
> output once
> per day rather than at most once per second.  This is not an
> optimization, since the new code is slower than the old code,
> but it was
> done to try to reduce the negative effects of the changes.
>   -  Implemented the parse(String, ParsePosition) method to
> continue the
> attempt to make this class as similar to DateTimeDateFormat
> as possible
> (and because it was rather simple).
>   -  Deprecated ISO8601DateFormat(TimeZone)
>
> o.a.l.helpers.DateLayout
>   -  Modified to not use the deprecated constructors in
> AbsoluteTimeDateFormat and its subclasses.
>   -  Added setDateFormat(String, String) method to round out the
> collection of these methods, and rationalized how these methods deal
> with null TimeZones and/or format Strings.
>
> o.a.l.TTCCLayout
>   -  Modified setDateFormat call in the default constructor.
>
> o.a.l.helpers.RelativeTimeDateFormat
>   -  Added do-nothing setTimeZone method so that the creation of all
> DateFormat subclasses could follow a set sequence of method calls.
>
> o.a.l.lf5.util.LogFileParser
>   -  Modified to call DateTimeDateFormat.parse(String) rather than
> assume that the format of the DateTimeDateFormat date is "dd MMM yyyy
> HH:mm:ss,SSS".  It was this code that made me realize that Pattern
> Layout should have a %R option, especially since the DATE
> layout cannot
> be relied upon to parse back into a Date object.  However, I
> wonder if
> LF5 shouldn't simply be modified to parse the XMLLayout
> rather than the
> PatternLayout.
>
> o.a.l.lf5.FilteredLogTableModel
>   -  Modified getColumn(int, LogRecord) to display the date and time
> String using DateTimeDateFormat.format rather than
> Date.toString() + the
> long timestamp.
>
> o.a.l.lf5.viewer.FilteredLogTableModel
>   -  Modified getColumn(int, LogRecord) to display the date and time
> String using DateTimeDateFormat.format rather than
> Date.toString() + the
> long timestamp.
>
> o.a.l.helpers.PatternParser
>   -  Added parsing of date/time (%d) suboptions @t, @c, @l and @d.
>  These are the new suboptions that were prompted by Marks
> original post
> to this thread.
>   -  Added parsing of new PatternLayout option %R. This option simply
> causes the 1-1-1970-00:00:00.000 relative timestamp to be
> output to the Log.
>
> o.a.l.PatternLayout
>   -  Modified the class JavaDocs to explain the new date/time
> suboptions.
>
> The zip also contains the following new/modified Test Cases and
> supporting files:
> o.a.l.helpers.AbsoluteTimeDateFormatTestCase
>   -  New JUnit TestCase for AbsoluteTimeDateFormat.
>
> o.a.l.helpers.DateTimeDateFormatTestCase
>   -  New JUnit TestCase for DateTimeDateFormat.
>
> o.a.l.helpers.ISO8601DateFormatTestCase
>   -  New JUnit TestCase for ISO8601DateFormat.
>
> o.a.l.PatternLayoutTestCase
>   -  Added test cases for the PatternLayout and DateFormat changes.
>   -  Added  new properties and witness files to support the
> new test cases.
>
> o.a.l.util.Filter
>   -  Modified so Time Patterns can have both types of decimal
> separators.
>
> o.a.l.varia.ErrorHandlerTestCase
>   -  Modified to use the patterns defined in Filter.
>
> o.a.l.util.xml.DOMTestCase
>   -  Modified to use the patterns defined in Filter.
>
> Finally, the zip contains:
> -  A modified test/build.xml to run the new and modified tests.
> -  Unified diffs for all the modified java source.
>
>
> Please let me know if there are any more modifications that
> need to be
> made before these changes can be accepted.
>
> --
> Cheers,
> Mike McAngus
> [EMAIL PROTECTED]
>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to