Microsoft KB Archive/819845

= PRB: Log File Stops Logging When the Set Limit Is Exceeded =

Article ID: 819845

Article Last Modified on 6/12/2003

-

APPLIES TO


 * Microsoft TV Basic 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: 

  Max  Detail GoryDetail 

 0 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
<ol> <li>Click Start, point to Programs, point to Microsoft TV Server, and then click MSTV CMD Shell.</li> <li>Run the following command to make a copy of the Headend.xml file:

tvs get-config C:\temp

</li> <li>Edit the copy of the Headend.xml configuration file. Set the log file parameters: MaxFileSize, RotationPeriod, and MaxOldFiles, and then save the file.</li> <li>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

</li></ol>

<div class="status_section">

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

<div class="moreinformation_section">

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 &quot;latest&quot; 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.

Additional query words: log file, logging

Keywords: kbprb KB819845

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.