Using console log mirroring

Console log mirroring causes a new server thread to be created which monitors all messages written to the Console Log file and duplicates these messages into another file. When this new file is filled, the thread closes the mirrored file and creates a new file into which subsequent messages are written. You can delete the closed mirrored files at your discretion.

Console log mirroring has three related NOTES.INI settings:

  • Console_Log_Mirror=1 -- Enables the mirroring feature
  • Retain_Mirror_Logs=1 -- Prevents deletion of previous mirrors when Domino® starts
  • Console_Log_Max_Kbytes= -- Sets the maximum size of the Console Log/mirror files

Use the NOTES.INI setting Console_Log_Mirror=1 to enable console mirroring when you initialize your server. When mirroring is enabled, all keystrokes are copied to the console log and mirrored, so backspaces can appear in the console logs. By default, console log mirroring is disabled.

When enabled, console log mirroring creates the new server thread Console Log Mirror Task. If the NOTES.INI setting Retain_Mirror_Logs=1 is not set, the new task begins deleting previous mirror files, and then creates a new file assigned the name of the console log (console.log) with a number appended to it. The maximum appended number is 999. The first available number is used. If console10.log exists, console9.log and then console11.log are created. The console.log file is created in the IBM_TECHNICAL_SUPPORT directory under the data directory. As the console log changes, data is read from the console log and copied to the new mirror log file.

Console log mirroring uses circular logging; therefore, when mirroring is enabled, circular logging is automatically enabled. When the console log wraps, the new mirror file is created. When mirroring is enabled, the default value for Console_Log_Max_Kbytes is 100,000 (100 MB) and the maximum value is 1,000,000 (1 GB). If mirroring is enabled and Console_Log_Max_Kbytes is not specified in the NOTES.INI file, the setting is not written back to the NOTES.INI file. Instead, Domino® acts as though Console_Log_Max_Kbytes=100000 had been specified.

If mirroring fails, the following message is printed to the console log:

Console Log Mirror Task has been disabled 

The server can tolerate up to a three second delay by the mirror task. If the mirror task fails to catch up in three seconds, mirroring is automatically disabled. A failed read or write will also disable console log mirroring. Mirroring remains disabled until the server is restarted.

Example

The NOTES.INI file contains Console_Log_Mirror=1. The Domino® server is started. The file console.log is created in the IBM_TECHNICAL_SUPPORT directory under the data directory. File console1.log is created. The file console.log captures console output and grows to 100MB. Data is also written to console1.log. When console.log reaches 100MB, console1.log is closed and console2.log is created. The position in console.log is reset to the beginning and previous data is overwritten. New data is copied to console2.log. The cycle repeats until Domino® terminates or until console999.log reaches 100MB. When Domino® is restarted, console1.log through console999.log are deleted because Retain_Mirror_Logs=1 is not specified in the NOTES.INI file.