RollingFlatFileTraceListener Class

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.1304.0)

public class RollingFlatFileTraceListener : FlatFileTraceListener

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.
© 2015 Microsoft