TraceLogRetentionOption Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the file structure that will be used for the EventSchemaTraceListener log.
public enum class TraceLogRetentionOption
public enum TraceLogRetentionOption
type TraceLogRetentionOption =
Public Enum TraceLogRetentionOption
- Inheritance
Fields
Name | Value | Description |
---|---|---|
UnlimitedSequentialFiles | 0 | An unlimited number of sequential files, each with a maximum file size that is determined by the MaximumFileSize property. There is no logical bound to the number or size of the files, but it is limited by the physical constraints imposed by the computer. |
LimitedCircularFiles | 1 | A finite number of sequential files, each with a maximum file size. When the MaximumFileSize property value is reached, writing starts in a new file with an incremented integer suffix. When the MaximumNumberOfFiles property value is reached, the first file is cleared and overwritten. Files are then incrementally overwritten in a circular manner. |
SingleFileUnboundedSize | 2 | One file with no maximum file size restriction. |
LimitedSequentialFiles | 3 | A finite number of sequential files, each with a maximum file size. When the MaximumFileSize property value is reached, writing starts in a new file with an incremented integer suffix. |
SingleFileBoundedSize | 4 | One file with a maximum file size that is determined by the MaximumFileSize property. |
Remarks
The TraceLogRetentionOption enumeration is used to specify the value of the TraceLogRetentionOption property in the EventSchemaTraceListener class. That property setting determines the possible and default values for the EventSchemaTraceListener.MaximumFileSize and EventSchemaTraceListener.MaximumNumberOfFiles properties.
You can set the MaximumFileSize and MaximumNumberOfFiles properties through the maximumFileSize
and maximumNumberOfFiles
custom attributes in the configuration file or by using the maximumFileSize
or maximumNumberOfFiles
parameters in the EventSchemaTraceListener constructor. If the maximumFileSize
or maximumNumberOfFiles
attributes in the configuration file specify an out-of-range value, the properties are set to their default values. If you specify an out-of-range value in the maximumFileSize
or maximumNumberOfFiles
parameter when you call the EventSchemaTraceListener constructor, an ArgumentOutOfRangeException is thrown.
The following table shows the possible and default values for file size and file count that are associated with each trace log retention option. "N/A" indicates that the associated property is not checked for that TraceLogRetentionOption value.
TraceLogRetentionOption | Maximum file size | Default file size | Maximum number of files | Default number of files |
---|---|---|---|---|
LimitedCircularFiles | N/A | -1 | N/A | 1 |
LimitedSequentialFiles | >0 | 4 kB | N/A | 1 |
SingleFileBoundedSize | >0 | 4 kB | N/A | -1 |
SingleFileUnboundedSize | >0 | 4 kB | >0 | 1 |
UnlimitedSequentialFiles | >0 | 4 kB | >1 | 2 |