Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
Troubleshooting Resources : Logging in OpenEdge : Log size threshold : Specifying the number of log files retained
 
Specifying the number of log files retained
You can specify how many rolled-over log files to keep when a log threshold value is set for a given log file. The specified number represents the maximum total number of log files to keep on disk at any time, including the log currently being written to. The number takes into account any log files that already exist at the time the session starts up plus any new ones created during that session. For example, if there are five log files on the disk at startup and you specify you want a maximum of three, OpenEdge deletes the oldest two. Then, each time it creates a new one, OpenEdge deletes the next oldest one. The default value is 3. Possible values are 0, 2, 3 or greater.
Note: A value of 0 means that OpenEdge will create as many files as necessary. Values of 1 or greater than 999999 are not valid and cause a run-time error to occur and the OpenEdge process terminates.
You can specify the number of log files retained by using:
*The Number of Log Files to Keep (-numlogfiles) startup parameter
*The numLogFiles and related properties in the ubroker.properties file with OpenEdge Management or OpenEdge Explorer
The following table shows how to specify the number of log files retained.
Table 31. Specifying the number of retained log files
Method
General syntax
Example
Startup parameter
-numlogfilesn
-numlogfiles 2
OpenEdge Management or OpenEdge Explorer, or ubroker.properties files
numLogFiles = nsrvrNumLogFiles = nbrkrNumLogFiles = n
numLogFiles = 2
Note: You can read the number of log files retained by using the NUM-LOG-FILES attribute on the LOG-MANAGER system handle.
For a detailed description of the Number of Log Files to Keep (-numlogfiles) startup parameter, see OpenEdge Deployment: Startup Command and Parameter Reference.
For a detailed description of the LOG-MANAGER system handle, see OpenEdge Development: ABL Reference.
For more information on ubroker.properties, see the ubroker.properties.README file in $INSTALLDIR/properties/ubroker.properties.README.
To use OpenEdge Management or OpenEdge Explorer to view and set properties, see Logging settings .
This attribute is read only for the DSLOG-MANAGER system handle due to the multi-user nature of the open log file for DataServers. This value can only be set at client or broker startup.