There are no implicit OpenEdge utilities to truncate UBroker log files. Only databases have the PROLOG utility. OS tools however can be used.
Care needs to be taken when the UBroker is running as certain utilities (such as using vi to edit the file) can result in the file that is currently opened by the process being unlinked to the file system and as a result the Broker will no longer write to the same file. Never delete the logfile while the Server/Broker process is writing to it.
$ echo "" > [nameoflogfile].log
- To preserve the current and create a new log file with only the last 50 lines:
$ cp [nameoflogfile].log newlogfile.log
$ tail -n 50 newlogfile.log > [nameoflogfile].log
The above examples can be customised to requirement and will work on any of the OpenEdge Server products log files including the admserv.log and database lg files.
UBroker logfile rotation:The size of UBroker logfiles can be managed with startup configuration parameters in the
ubroker.properties file.
Since Progress 9.1x UBroker the log file threshold size can be set with brkrLogThreshold and srvrLogThreshold
Since OpenEdge 10.x the number of UBroker log files can be set with brkrNumLogFiles and srvrNumLogFiles
Never delete the number-of-logfiles configured, while the Server/Broker process is running. Refer to Article
How to configure rolling log files for AppServer, WebSpeed and client logs ?