By default, when the log reaches 1 GB, the mtb_server.log file is renamed with a timestamp and a new log is started. The log files can use up a lot of disk space and this could lead to poor performance. To avoid this problem, you can control the file size before renaming occurs and specify how many backups to keep in your disk.
To manage the server log files
-
Close the Repository Manager.
-
Go to the server installation directory and look for the etc folder. For example, if you selected the default directory during the server installation, the etc folder is in C:/Program Files/Trillium Software/MBSW/17. Within that folder is the config.txt file.
-
Open the config.txt file in a text editor.
-
Locate the following parameters under the key server section:
value logfile_size_max 1024 value logfile_backups 16
-
logfile_size_max - The maximum size of the log file in megabytes. For example,
logfile_size_max 500
means a maximum log file size of 500MB. If this parameter is omitted or set to ‘0
’ a default log file size of 1024MB is applied. -
logfile_backups - The number of backup versions of the log file. For example,
logfile_backups 4
means keep a maximum of 4 backup files. If this parameter is omitted or set to ‘0
’ the maximum number of log files is set to 255.
When the current mtb_server.log file exceeds its configured maximum size a new backup file is created, and if the total number of backup files now exceeds the user-configured maximum, the files with the oldest timestamp are deleted until only the maximum number of backup files remain.
Backup files are identified as the filename pattern of mtb_serverYYYYMMDD.log where YYYYMMDD is a datestamp in the inclusive range 10000101 through 29991231.
Note: Usually only a single backup file will be deleted, but if you have recently reconfigured the value of logfile_backups then more than one backup file may be deleted. -
-
Change the default values of the parameters.
-
Save and close the file.
-
Restart the Repository Manager.