Admin UI server.log: changing log rotation from daily basis to size basis.

Document ID : KB000124393
Last Modified Date : 18/01/2019
Show Technical Document Details
Question:
Customer wants to change the log rotation of AdminUI server.log from daily basis (periodic-rotating-file-handler) to size basis (size-rotating-file-handler).
Is it possible to switch between them?
Answer:
Yes, it is possible to changing the log rotation settings of JBoss(Wildfly) for AdminUI from daily basis to size basis.

[Procedures]
1. Open a command prompt
2. Change directory to %NETE_PS_ROOT%\adminui\bin
3. Run JBoss mangement CLI
jboss-cli.bat --connect controller=127.0.0.1:9990
4. Execute the following commands
/subsystem=logging/periodic-rotating-file-handler=FILE:remove
/subsystem=logging/size-rotating-file-handler=FILE:add(file={path="server.log",relative-to="jboss.server.log.dir"})
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name=autoflush,value="true")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name=named-formatter,value="PATTERN")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name=rotate-size,value="2m")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name=max-backup-index,value="3")
/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name=append,value="true")
5. Shutdown JBoss and quit CLI
:shutdown
quit
6. Start SiteMinder Administrative UI service

This change can be done with the knowledge of JBoss, not CA SSO. We cannot assure that this change satisfies your expectations.
Additional Information:
Before changing the original settings, they can be shown with the following JBoss management CLI command.
/subsystem=logging/periodic-rotating-file-handler=FILE:read-resource
The parameters shown in the output can be used for restoring the original settings.