Configure the Log File
The logfile configuration parameter in tibemsd.conf controls the location and the name of the log file.
You can specify that the log file should be backed up and emptied after it reaches a maximum size. This allows you to rotate the log file and ensure that the log file does not grow boundlessly. The logfile_max_size configuration parameter allows you to specify the maximum size of the current log file. Set the parameter to 0 to specify no limit. Use KB, MB, or GB units.
Once the log file reaches its maximum size, it is copied to a file with the same name as the current log file except a sequence number is appended to the name of the backup file. On startup—and only on startup—the server queries the directory and determines the first available sequence number. It then uses the next sequence number when it needs to back up the current log file. By doing so, you can keep a continuous sequencing, as long as you retain the most recent log file (highest sequence number) between server restarts. Conversely, if you move or remove all log files before a server restart, then the sequencing will restart at 1.
For example, if the current log file is named tibems.log, the first copy is named tibems.log.1, the second is named tibems.log.2, and so on. Similarly, if the highest sequence number in use when the server starts is 19, or tibemsd.log.19, then the next backup file created will be named tibemsd.log.20. This is true even if you removed tibemsd.log.19 and all other log files after the server started.
If logfile_max_count is specified, the server keeps at most the number of log files specified by that parameter, including the current log file. When the maximum number of log files has been reached and the server needs to back up the current log file, it deletes the oldest log file (the ones with smallest number). If you change the parameter setting, after the server is restarted, the next time it needs to rotate the log file it deletes however many of the lowest sequence numbered files required to reach the logfile_max_count maximum.
You can also dynamically force the log file to be backed up and truncated using the rotatelog command in tibemsadmin. See Command Listing for more information about the rotatelog command.
For other configuration parameters that affect the log file, see Tracing and Log File Parameters.