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 following table shows how to specify the number of log files retained.

Table 1. Specifying the number of retained log files
Method General syntax Example
Startup parameter
-numlogfilesn
-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 Startup Command and Parameter Reference.

For a detailed description of the LOG-MANAGER system handle, see ABL Reference.

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.