Per Directory 2.0 Article

IISLogs 2.0 Per Directory Feature

Introduction

In IISLogs 2.0, we introduced a new feature called Per Directory. This feature allows 17 options to be specified on a Per Directory basis. You get all the powerful and flexible features IISLogs provides on a per directory basis.

How to Manage

The Per Directory feature can be managed using IISLogsGUI. Here is a screenshot of the management interface. You can also manage the Per Directory feature via the config file called SampleZipPerDirectory.xml. (Note: The name of the file can’t be altered). You can update the file using a text editor (such as Notepad). We recommend you manage a few directories using IISLogsGUI before managing the configuration file directly. If you decide to manage the file directly, all data including brackets need to be added for each folder entry. Please review the sample configuration file in the Options section.

Options

Each directory has 17 options that can be defined. Here is the complete list on a per directory basis.

Option Name Description
c:windowssystem32inetsrvurlscanlogs Directory name
true Compress file
48 Time period in hours
true Delete original file after compressed has completed.
false Separate option to delete files.
0 Retention Period in hours for how old the file should be.
false Recursive Option to start at a particular directory and recursively get all sub-folders. i.e. d:wwwlogs
false Process the ‘Root folder as well as sub-folders’.
local Where files are store. local is default, this leaves the file in the original location This can also be a UNC path
false When using a UNC path or alternative directory, include PC name.
false Process Unknown file extensions. System file extensions and folders aren’t processed.
false Process TXT based file extensions
false Process BAK based file extensions
false Process DAT based file extensions
false Process XML based file extensions
Default Implemented for future use
! Implemented for future use


Example configuration file with multiple folders.
<NewDataSet>
<DirectoryName>c:windowssystem32inetsrvurlscanlogs</DirectoryName>
<ZipFile>true</ZipFile> <ZipRetentionPeriod>48</ZipRetentionPeriod>
<DeleteOriginalFile>true</DeleteOriginalFile>
<DeleteFile>false</DeleteFile>
<DeleteRetentionPeriod>0</DeleteRetentionPeriod>
<Recursive>false</Recursive>
<ProcessRootFolderRecursive>false</ProcessRootFolderRecursive>
<ZipFilePath>local</ZipFilePath>
<IncludeComputerName>false</IncludeComputerName>
<ProcessUnknownExtensions>false</ProcessUnknownExtensions>
<ProcessTXT>false</ProcessTXT>
<ProcessBAK>false</ProcessBAK>
<ProcessDAT>false</ProcessDAT>
<ProcessXML>false</ProcessXML>
<NamingConvention>Default</NamingConvention>
<Delimiter>!</Delimiter>
</NewDataSet>

<NewDataSet>
<DirectoryName>c:inetpublogs</DirectoryName>
<ZipFile>true</ZipFile>
<ZipRetentionPeriod>48</ZipRetentionPeriod>
<DeleteOriginalFile>false</DeleteOriginalFile>
<DeleteFile>false</DeleteFile>
<DeleteRetentionPeriod>0</DeleteRetentionPeriod>
<Recursive>false</Recursive>
<ProcessRootFolderRecursive>false</ProcessRootFolderRecursive>
<ZipFilePath>local</ZipFilePath>
<IncludeComputerName>false</IncludeComputerName>
<ProcessUnknownExtensions>false</ProcessUnknownExtensions>
<ProcessTXT>false</ProcessTXT>
<ProcessBAK>false</ProcessBAK>
<ProcessDAT>false</ProcessDAT>
<ProcessXML>false</ProcessXML>
<NamingConvention>Default</NamingConvention>
<Delimiter>!</Delimiter>
</NewDataSet>

Misc items

  • If you use the Per Directory features along with other features such as SpecificDirectoriese, you’ll need to agree to the Compression Folder policy and Delete file File policy. These can be set using the IISLogsGUI ‘quick wizard’ option. Here is a article that discussed this option further. http://www.iislogs.com/help/IISLogs20/123goconfigure2.htm If policies aren’t set, no files will be processed.
  • When using the Per Directory feature and storing files in a alternative location besides the local directory, all directory information will be included in the path. For example. If your log files are stored locally in d:wwwlogw3svc1. When you store the files on a remote server such as \FileServer01D$LogFiles. The path to stored files would be \FileServer01D$LogfilesServerNamewwwlogsw3svc1. Note: wwwlogsw3svc1 are included and can’t be excluded. IISLogs is designed to keep original file location information on a remote server. The Per Directory option allows you to include or exclude the server name in the path. We designed IISlogs to have multiple machines move files to a central location. This is why the server name is included to keep the folders unique.
  • Per Directory has a option called ProcessUnknownExtensions. The feature is designed to handle log files with custom naming conventions such as .06302008. By default, IISLogs by default only handles certain file extensions. One security feature integrated into IISLogs no system files or folders will be processed, either when using ProcessUnknownExtensions or regular IISlogs options.C:WindowsSystem32Logfiles is the only folder below C:windows that will be processed. We strongly encourage you test this option on a non-production machine before implementing. Also, make sure you have backups of all files before running IISLogs.
  • Files need to be at least one hour old to be processed. The product is designed to handle logs that are at least one hour old. For example, if you set the run time at 1:01 AM (assuming they rolled over at midnight). The files should be processed after not being updated for at least an hour.
  • Per Directory has an option called Recursive. This is a very powerful feature. If you set the Recursive option to True, IISLogs will start at the root folder and process all sub-directories. For example, if you have a folder called E:Logs. Anything below E:Logs will be processed. There is no way to exclude specific sub-folders. All folders will inherit the settings. The root folder E:Logs could contain files, the Recursive option does not automatically process files. There is an option called Process Sub-Folders, it will include the files located in E:Logs. This particular option offers flexibility.