How to make dynamic changes to the logging configuration

It is possible, under certain circumstances, to make dynamic changes to the PolicyCenter logging configuration without having to redeploy PolicyCenter. Changing the database logging level dynamically does not make any change to existing database connections. The new logging level only takes effect for new database connections.

For example, if the database log level is set to debug, PolicyCenter logs all SQL statements. However, if you set the debug logging level dynamically, PolicyCenter only logs SQL statements for new connections created within the connection pool. For an existing connection, dynamically changing the logging level to debug has no affect.

To reset the logging configuration dynamically, do one of the following.

Change type

Persistence

Reset the log level from PolicyCenter, or by using system tools or a web service.

Temporary, ends at server restart

Update file log4j2.xml and reload the file by using system tools or a web service.

Continues after server restart

You must use one of these methods to propagate logging configuration changes dynamically. Otherwise, to change a logging level, rebuild your PolicyCenter WAR or EAR and deploy it to the application server.

See also