7.6. Log files and log rotation#
Use this page to learn which log files Nubus for UCS stores and how the system rotates them. It also covers separate log rotation settings for Univention Directory Listener modules.
7.6.1. Log file locations#
Nubus for UCS stores its product-specific log files
in the /var/log/univention/ directory,
for example log files for listener and notifier replication.
Services write their log messages
to their own standard log files.
For example,
Apache writes log messages to the /var/log/apache2/error.log file.
7.6.2. Log rotation#
logrotate manages the log files.
It creates numbered log file archives at configured intervals
and deletes older archives.
The UCR variables logrotate/rotate
and logrotate/rotate/count
control log rotation.
The logrotate/rotate variable
specifies the rotation criterion,
for example weekly or size 50M.
The logrotate/rotate/count variable
specifies how many rotated log file archives the system keeps.
By default,
the system rotates log files weekly
and keeps 12 archives.
For example,
the current log file for Univention Directory Listener
is the listener.log file.
The archive for the previous rotation
is the listener.log.1 file.
Use the logrotate/compress UCR variable
to control whether gzip compresses older log files.
7.6.3. Listener module log files#
Each log file in the /var/log/univention/listener_modules directory
has its own logrotate configuration.
Listener module log files use global settings by default
and can also use per-log-file overrides.
The logrotate/listener-modules/DIRECTIVE UCR variable
configures the global settings.
For a complete list of supported directives,
see the logrotate manual page.
7.6.3.1. Global listener module logrotate settings#
Use these settings when you want to apply the same logrotate behavior to all listener module log files. Nubus for UCS supports the following directives for listener module log files:
- logrotate/listener-modules/rotate#
Defines how often the system rotates listener module log files.
- Default value:
weekly
- logrotate/listener-modules/rotate/count#
Defines how many rotated log files the system keeps.
- Default value:
12
- logrotate/listener-modules/create#
Defines the permissions and ownership for newly created log files.
- Default value:
640 listener adm
- logrotate/listener-modules/missingok#
Defines whether logrotate continues when a log file is missing.
- Default value:
missingok
- logrotate/listener-modules/compress#
Defines whether logrotate compresses rotated log files.
- Default value:
compress
- logrotate/listener-modules/notifempty#
Defines whether logrotate skips empty log files.
- Default value:
notifempty
7.6.3.2. Per-log-file overrides#
Use the following UCR variable pattern
to configure settings for a specific log file:
logrotate/listener-modules/LOG_FILE_NAME/DIRECTIVE.
Use the log filename without the .log filename extension.
You can override the same directives
that the global settings section lists.
For example,
to configure the rotation interval for example.log,
use logrotate/listener-modules/example/rotate.