[ 
http://issues.apache.org/jira/browse/LOG4NET-59?page=comments#action_12369012 ] 

Nicko Cadell commented on LOG4NET-59:
-------------------------------------

Ron,

I much prefer exposing the DateTimeStrategy rather than adding specialised 
control flags, this allows the user to implement their own strategy if the 
built-in options do not suit.

A few questions/suggestions/enhancements:

How about renaming the DefaultDateTime class to LocalDateTime. This would fit 
better with the name of the UniversalDateTime alternative and is a better 
description of the behaviour.

Could you add a <value> and <remarks> section to the doc comments for the new 
DateTimeStrategy property. In the remarks indicate what the default value is; 
what the expected behaviour of the IDateTime is (to return a timestamp for the 
event); and list the implementations that are available and how they should be 
specified in the config file. The nested class syntax is not widely known so it 
would be good to include a very brief paragraph on that which gives the 
example: <c>log4net.Appender.RollingFileAppender+UniversalDateTime</c>.

Should it be considered an error to set the strategy to null? Should the 
DateTimeStrategy setter check for null and throw an exception? The alternative 
is to leave the m_dateTime null until ActivateOptions. If null then it is set 
to an instance of DefaultDateTime, then it wouldn't be an error to set 
DateTimeStrategy to null. I think we need to do one or the other, and probably 
the second, i.e. the appender tries its best to recover.

Can you commit your patch with the above changes and mark this issue as 
resolved.

Cheers.

> [PATCH] to RollingFileAppender.cs to add the ability to roll files based on 
> universal time (UTC).
> -------------------------------------------------------------------------------------------------
>
>          Key: LOG4NET-59
>          URL: http://issues.apache.org/jira/browse/LOG4NET-59
>      Project: Log4net
>         Type: New Feature
>   Components: Appenders
>     Versions: 1.2.9
>     Reporter: Lanchon
>     Assignee: Ron Grabowski
>  Attachments: Original-1.2.9-beta-RollingFileAppender.cs, 
> Patched-1.2.9-beta-RollingFileAppender.cs, 
> RollingFileAppender_UniversalDateTime.patch, informative-diff.txt
>
> the file naming and rolling time zone is selected via a new property. the 
> default value of this property provides backwards compatible bahviour. the 
> patch is done on the published 1.2.9beta version. the diff file is only 
> informative (not made with the right tool), use original and patched files to 
> create a useful diff (accpet my apologies for this). -L

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to