Share via


LogFilePeriod

LogFilePeriod specifies how often Microsoft Windows should create a new log file. This property can be set to the following values as seen in the Bitmask Values section: 1 (daily), 2 (weekly), 3 (monthly), or 4 (hourly). If this property is set to 0, a new file will be created when the maximum size designated in LogFileTruncateSize is reached.

Attribute Name Attribute Value
XML Data Type DWORD
WMI Data Type
SINT32
ADSI Data Type DWORD
ABO Data Type DWORD
ABO Metabase identifier
MD_LOGFILE_PERIOD
Attributes INHERIT
Default Value 1
MetaFlagsEx CACHE_PROPERTY_MODIFIED
User Type IIS_MD_UT_SERVER
StartingNumber Not applicable
EndingNumber 4
ID 4003

Configurable Locations

You can configure this property at the following locations in the IIS metabase.

Metabase Path IIS Admin Object Type
/LM/W3SVC/n IIsWebServer
/LM/MSFTPSVC/n IIsFtpServer
/LM/W3SVC IIsWebService
/LM/MSFTPSVC IIsFtpService
/LM/NNTPSVC IIsNntpService
/LM/NNTPSVC/n IIsNntpServer
/LM/SMTPSVC IIsSmtpService
/LM/SMTPSVC/n IIsSmtpServer

Values

Constant Value Description
MD_LOGFILE_PERIOD_MAXSIZE 0x00000000 Create new log file after reaching themaximum size.
MD_LOGFILE_PERIOD_DAILY 0x00000001 Create new log file daily.
MD_LOGFILE_PERIOD_WEEKLY 0x00000002 Create new log file weekly.
MD_LOGFILE_PERIOD_MONTHLY 0x00000003 Create new log file monthly.
MD_LOGFILE_PERIOD_HOURLY 0X00000004 Create a new log file hourly.

Code Example

For general code examples, please see Code Examples to Configure Metabase Properties

LogFileTruncateSize