PRB: Log File Stops Logging When the Set Limit Is Exceeded (819845)



The information in this article applies to:

  • Microsoft TV Foundation Server 1.0

SYMPTOMS

The debug log files stop logging when they reach their preset size limits.

CAUSE

By default, debug log files have a defined file size. Typically, there are two options when a log file reaches its size limit:
  • Stop logging new data.

    -or-
  • Start to overwrite data from the start of the log file.
However, if the log file overwrites data, you lose the oldest data.

By design, the log file stops logging new data when the default file size limit is reached. Logging starts again when the server rolls to a new log file. (You can configure the RotationPeriod parameter to control when the server rolls to a new log file.)

WORKAROUND

To work around this problem, you can either increase the default size limit of the log file or you can set the size limit to 0 (unlimited logging). To do this, you must modify the MaxFileSize parameter of the configuration settings in the Headend.xml file.

The following is the section of the Headend.xml file that contains the log file parameters:
<!-- ================================================================== -->
<!-- = Section 3:                                                     = -->
<!-- = Optional overrides for config settings in Defaults.xml         = -->
<!-- =                                                                = -->
<!-- = Un-comment out sections you want to change.  These are just a  = -->
<!-- = few of the more common config settings, see Defaults.xml       = -->
<!-- = for other things that you may want to change.                  = -->
<!-- ================================================================== -->


<!-- Edit to increase log file sizes or change expire policy -->

<!-- Insert an entry to increase the logging level of an application -->

        <DebugLogging>
                <DebugLevel name="AdminService"> Max </DebugLevel>
                <DebugLevel name="HTMLGateway">Detail</DebugLevel>
                <DebugLevel name="AVC">GoryDetail</DebugLevel>
        </DebugLogging>

        <FileLogSink>
                <MaxFileSize>0</MaxFileSize>
                <RotationPeriod>1 day</RotationPeriod>
                <MaxOldFiles>2</MaxOldFiles>
        </FileLogSink>
  • MaxFileSize The maximum size of the log file. A value of 0 means that there is no limit to the file size.
  • RotationPeriod The period when the contents of the log files are rotated. A value of 0 disables log file rotation.
  • MaxOldFiles The maximum number of historical log files to maintain.

Steps to Modify the Headend.xml File

  1. Click Start, point to Programs, point to Microsoft TV Server, and then click MSTV CMD Shell.
  2. Run the following command to make a copy of the Headend.xml file:

    tvs get-config C:\temp

  3. Edit the copy of the Headend.xml configuration file. Set the log file parameters: MaxFileSize, RotationPeriod, and MaxOldFiles, and then save the file.
  4. Run the tvs commit-config command to commit the changes. For example, run the following command:

    tvs commit-config C:\temp

    where C:\temp is the local directory (now the source directory) that you want to copy the Headend.xml file from.

    You receive the following messages:Compiling config

    Commit Successful

STATUS

Microsoft has confirmed that this is a problem in Microsoft TV Foundation Server 1.0.

MORE INFORMATION

There are many ways to perform debug logging. However, each way has limitations. By default, the log file size limit should be sufficiently large for the debug level that you are using. Under typical operations, if your server experiences no error conditions, overflows should not occur.

However, if your server experiences an error condition that causes the log files to fill suddenly, you do not want to lose the data about what may have caused the error condition. Typically, when an error condition occurs, the same data repeats many times in the log.

The "latest" data is not as useful as the debug data that is logged at the time that the operating condition changed to an error condition. If the logs were rolled over, you would lose that transition data. Therefore, when a log file data overflow occurs, logging stops.

Modification Type:MajorLast Reviewed:6/12/2003
Keywords:kbprb KB819845 kbAudITPRO