Connece CDC Console, Connect CDC Kernel, Connect CDC Listener, and Connect CDC MonCon logs can be set up to rotate to prevent excessive growth. Log contents can be archived to another instance of the log (rotating) whenever it reaches a specified size or age.
-
When there is activity, whichever limit, regardless of whether it is size or age, is reached first, triggers the archive.
-
If there is no activity, the logs do not rotate, no matter how much time has passed.
The default parameters for this log file are set to a size of 10 MB and to midnight.
If you want to set rotating log parameters, adjusting the size, age, or file number settings, extract the log4jL.properties files and log4jK.properties files from the omni.jar file, as described below.
-
From a command prompt in the directory where omni.jar is located, use the following command and consult the table for the name of the .properties file.
jar xvf omni.jar omnienterprise/msg/<properties file in table>
Properties file |
What it is associated with |
---|---|
log4jK.properties |
Connect CDC Kernel |
log4jL.properties |
Connect CDC Listener |
log4jM.properties |
Connect CDC MonCon |
log4jU.properties |
Connece CDC Console |
-
This command extracts the .properties file and places it in the omnienterprise/msg directory.
-
Edit the file by changing the date pattern, size of file, time or unit of time, or number of backup files.
-
Save and exit.
To activate rotating logs, work with one of the following methods described below:
Method 1:
Unix/Linux
-
Use the following command to move the omnienterprise directory from the jarfiles directory to the kernel directory where the Connect CDC Listener script is located.
mv jarfiles/omnienterprise kernel
-
Restart the Connect CDC Listener to activate rotating logs.
Windows
-
Restart the Connect CDC Listener to activate rotating logs.
Method 2:
Unix/Linux
-
Use the move (mv) command to move jarfiles/omnienterprise/msg/log4jx.properties to the kernel directory.
Where x = K for the kernel properties file
= L for the listener properties file
-
Edit the kernel/OmniListener.sh file and add the following options:
-Dlog4j.configuration=log4jK.properties and/or-Dlog4j.configuration=log4jL.properties
Where:-Dlog4j.configuration=log4jK.properties must be added within the include.-Dlog4j.configuration=log4jL.properties must be added in the beginning, outside the include.
The example below, shows a partial listing of the OmniListener.sh file, that includes a listing of these options:
-
Restart the Connect CDC Listener to activate rotating logs.
Windows
-
Move the kernel/omnienterprise/msg/log4jx.properties to the kernel directory.
Where x = K for the kernel properties file
= L for the listener properties file
- Edit the kernel/startlistener.cmd file and add the following options:
-Dlog4j.configuration=log4jK.properties and/or-Dlog4j.configuration=log4jL.properties
Where:-Dlog4j.configuration=log4jK.properties must be added within the include.-Dlog4j.configuration=log4jL.properties must be added in the beginning, outside the include.
The example below, shows a partial listing of the startlistener.cmd file, that includes a listing of these options:
-
Restart the Connect CDC Listener to activate rotating logs.