RollingFileAppender DateTimeStrategy Property | Apache log4net™ SDK Documentation

Gets or sets the strategy for determining the current date and time. The default implementation is to use LocalDateTime which internally calls through to DateTime.Now. DateTime.UtcNow may be used on frameworks newer than .NET 1.0 by specifying UniversalDateTime.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public RollingFileAppenderIDateTime DateTimeStrategy { get; set; }

    Public Property DateTimeStrategy As RollingFileAppenderIDateTime
    	Get
    	Set

    public:
    property RollingFileAppenderIDateTime^ DateTimeStrategy {
    	RollingFileAppenderIDateTime^ get ();
    	void set (RollingFileAppenderIDateTime^ value);
    }

    member DateTimeStrategy : RollingFileAppenderIDateTime with get, set

#### Property Value

Type: RollingFileAppender
IDateTime
An implementation of the RollingFileAppender
IDateTime interface which returns the current date and time.
Remarks

Gets or sets the RollingFileAppender
IDateTime used to return the current date and time.

There are two built strategies for determining the current date and time, LocalDateTime and UniversalDateTime.

The default strategy is LocalDateTime.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace