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. As of Gateway 25.1.1, the default number of retained log files is 10 (in previous versions, the default was unlimited).
If the Apache configuration file doesn't exist, Gateway
automatically generates it 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": falseDoing 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"