Is there a configurable parameter to disable the CLI logfiles ?
$ ls ./logs/clilog*txt |tail -4
Yes, it is DE 11.3.2 on AIX.
Your method kind'a work - It doesn't create the logfile and the cli completed but there is Java ERROR at launch
log4j:ERROR Appender [TRACELOG]. openNewFile() call failed.
java.io.FileNotFoundException: /clilog.txt (The file access permissions do not allow the specified action.)
. . .
log4j:ERROR No output stream or file set for the appender named [TRACELOG].
I guess the workaround for me is to specify an alternate -Dlog.directory location in order to seperate these clilogs from the server's audit logs and tracelogs.
I would assume you are running on DE 11.3.x. You can disable the clilog files in the cli script (cli.bat or cli.sh) located in the <DE_Server_dir>\bin directory.
Make a backup of the cli script before editting the script
Comment out the line;
This is from Windows environment, put a REM before the line (since it's a single java command);
REM "%JAVA_HOME%\java" ^REM -Dlog4j.configuration="file:///%CAWA_HOME%/conf/cli.log4j.xml" ^REM -Dlog.directory="%CAWA_HOME%\logs" ^REM -Dserver1.host="%PREFERRED_SRV%" ^REM -Dserver1.port="%PREFERRED_SRV_PORT%" ^REM -Dserver2.host="%STANDBY_SRV%" ^REM -Dserver2.port="%STANDBY_SRV_PORT%" ^REM -cp %CLASSPATH% com.cybermation.library.cli.CliRepl %*
The new line should look like this;
"%JAVA_HOME%\java" ^ -Dlog4j.configuration="file:///%CAWA_HOME%/conf/cli.log4j.xml" ^ -Dserver1.host="%PREFERRED_SRV%" ^ -Dserver1.port="%PREFERRED_SRV_PORT%" ^ -Dserver2.host="%STANDBY_SRV%" ^ -Dserver2.port="%STANDBY_SRV_PORT%" ^ -cp %CLASSPATH% com.cybermation.library.cli.CliRepl %*
Note the missing line: -Dlog.directory="%CAWA_HOME%\logs"
This is good to know. I have also been trying to clean up these CLI logs that are really not needed.
Is there a way you can run a Windows job and also be able to delete these logs?
esadev 7500 PW PW PURGECOMPLETEDJOBS olderthan('now less 1 days')
LIke this job only on the C drive to be able to get rid of logs.
Course I maybe able to setup a windows task that could get rid of these logs also. Checking. Audit logs would be nice to get rid of automatically also.
The PURGECOMPLETEDJOBS CLI command deletes information related to completed jobs from the DE Server completed jobs repository.
You can setup a Windows job to run command to delete cli logs not needed.
Ok Then what would be another good way to get rid of old audit logs that are also not needed?
We need some of these logs but would be nice to setup a job to get rid of these. Like if so many days old delete them.
Audit logs contain auditing information so the server does not automatically clean up these logs.
You can create your own script to backup and clean up audit logs as needed.
If this is something you want as an enhancement to product functionality, you can post this idea in the CA Community so that customers can vote on this.
The link is;
Click on "Log in" to login with your support online credentials, then
-> Select Actions
-> Create an idea.
Note that the DE Server is packaged with cleanup utility and purgelog command to remove archived server logs older than number of days old.
Retrieving data ...