RollingFlatFileTraceListener Class

Performs logging to a file and rolls the output file when either time or size thresholds are exceeded.

Namespace: Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners
Assembly: Microsoft.Practices.EnterpriseLibrary.Logging (in Microsoft.Practices.EnterpriseLibrary.Logging.dll) Version: 6.0.0.0 (6.0.1304.0)

Syntax

public class RollingFlatFileTraceListener : FlatFileTraceListener
'Declaration
Public Class RollingFlatFileTraceListener
    Inherits FlatFileTraceListener
public ref class RollingFlatFileTraceListener : public FlatFileTraceListener

Remarks

Logging always occurs to the configured file name, and when roll occurs a new rolled file name is calculated by adding the timestamp pattern to the configured file name.

The need of rolling is calculated before performing a logging operation, so even if the thresholds are exceeded roll will not occur until a new entry is logged.

Both time and size thresholds can be configured, and when the first threshold is reached, both will be reset.

The elapsed time is calculated from the creation date of the logging file.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Diagnostics.TraceListener
System.Diagnostics.TextWriterTraceListener
Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTextWriterTraceListener
Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener
Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener

See Also

RollingFlatFileTraceListener Members

Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners Namespace