When an application goes to production, the application server, on which the application is deployed, has to be tuned to accept a bigger load.
One of the basic optimization is to limit the I/O, by, for instance, reducing the amount of information logged.
This is quite easy when you have one or two servers but can rapidly become a repeatiting and annoying task when this number goes up to 5, and more.
That's why I'm providing a simple routine whose goal is to perform a sample log level adjustement for any server in the domain.
Here we go :
// Loading properties from a file located at the same location as the script
// Connecting to the administration server using the three values (USER, PASSWORD & URL) defined in the property file
servers = cmo.getServers()
for server in servers :
cd('/Servers/' + server.getName() + '/Log/' + server.getName())
cmo.setFileName(HOME + '/logs/' + server.getName())
Of course, this is only an example you can use, to start with.
Feel free to write your own options or preferences.