Delen via


RollingFlatFileTraceListener Class

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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)

Syntax

'Declaration
PublicClassRollingFlatFileTraceListener _
    Inherits FlatFileTraceListener
publicclassRollingFlatFileTraceListener : FlatFileTraceListener
publicref classRollingFlatFileTraceListener : public FlatFileTraceListener
publicclass RollingFlatFileTraceListener extends 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 of them occurs 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

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.