By default, log rotation is enabled for the messages.log and access.log. New files are created each time the Apache server is restarted or it exceeds 10MB in size.
By default, the log rotation is enabled to rotate the files once they reach 10MB.
If it doesn't exist, Gateway automatically generates the Apache
configuration file when the Gateway container is started. If you
require custom Log Rotation settings, you must include a
config.json file in the Built-in workspace or in the custom
workspace with the following line:
"generate_apache_config": false
Doing so will let you use your custom Apache configuration for your container.
Note: You
must generate a custom image using the Built-In Workspace. For more information,
refer to Adding Built-in workflows to the BlueCat Gateway Container.
Tip: If needed, you can add messages directly to Apache server logs. Add
messages using the app.logger object, where app is
imported from main_app. Adding messages in this way is useful in
cases where no user session session is active when a workflow is executed.
For example, to configure log rotation, type the following:
"|/usr/bin/rotatelogs ${APACHE_LOG_DIR}/<logtype>.log.%Y-%m-%d-%H_%M_%S 10M"