Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : CLEAR-LOG( ) method
 

CLEAR-LOG( ) method

Clears all messages existing in the current client log file and leaves the file open for writing.
Note: This method is valid only for DataServers, interactive clients, and batch clients. WebSpeed agents and AppServers write a message to the server log file indicating that it is invalid to use the CLEAR-LOG( ) method to clear a WebSpeed or AppServer server log file. In this case, the method returns FALSE.
WebSpeed agents and AppServers silently ignore the Client Logging (-clientlog) startup parameter. The broker handles the clearing of the WebSpeed and AppServer server logs, through the srvrLogAppend property in the ubroker.properties file.
Return type: LOGICAL
Applies to: DSLOG-MANAGER system handle, LOG-MANAGER system handle

Syntax

CLEAR-LOG( )
If the CLEAR-LOG( ) method successfully clears the open log file, it returns TRUE.
If the CLEAR-LOG( ) method fails, it returns FALSE and displays a warning message indicating the reason for the failure.
If there is no client log file, the CLEAR-LOG( ) method returns FALSE and displays a warning message that the operation is not valid when there is no log file.
If you specified a log file threshold with either the Log Threshold (-logthreshold) startup parameter or the srvrLogThreshold property in the ubroker.properties file, the CLEAR-LOG( ) method deletes any existing log files that match the name of the LOGFILE-NAME attribute, the Client Logging (-clientlog) startup parameter, or the DataServer Logging (-dslog) startup parameter. The method then re-creates and opens the first log file in the sequence and changes the LOGFILE-NAME attribute to reflect this.