...
The latter is recommended because all changes made to log4j through the management console persist in the WSO2 Registry. Therefore, those changes will be available after the server restarts. Changes that you make to the logging configuration via the management console will get priority over what is defined in the actual log4j.properties
file. However, if you modify the log4j.properties
file and restart the server, the earlier log4j configuration that persisted in the registry will be overwritten. There is also an option in the management console to restore the original log4j configuration from the log4j.properties
file.
Remedies for log growth
Log growth can be managed by the following configurations in the <PRODUCT_HOME>/repository/conf/
log4j.properties
file.
- Configurable log rotation: By default, log rotation is on a daily basis.
- Log rotation based on time as opposed to size: This helps to inspect the events that occurred during a specific time.
- Log files are archived to maximise the use of space.
The log4j-
based logging mechanism uses appenders to append all the log messages into a file. That is, at the end of the log rotation period, a new file will be created with the appended logs and archived. The name of the archived log file will always contain the date on which the file is archived.
Viewing logs
In each product, users can configure and adjust the logging levels for each type of activity/ transactions. There are several ways to view system and application logs of a running Carbon instance.
...