The instrument control software of ARGOS is a distributed system. It is unavoidable that problems will occur. In this case, a logging facility eases diagnosability of problems.
The ARGOS ICS provides the following log levels.
|| Computer programs failed to work correctly. They should terminate.
|| Basdard starts with a missing configuration file.
|| These log level messages require operator intervention.
|| The connection to the Laser device breaks.
|| Operators must expect that the Argos system fails to work properly.
|| Temperature for lasers exceeds some threshold.
|| These messages contain events that have a impact on the Argos software system state.
|| The laser pulse frequency is set.
|| For tracking down problems, log messages of this level support the engineer.
|| The laser water temperature is read back from the hardware.
- Argos ICS uses only the above mentioned log levels.
- Each device server must have a facility to change the log level during runtime.
Limitations of the Current Logging System
Argos ICS uses the logging sytem from TwiceAsNice
). At the moment (2012-02-10), this logging system has the following limitations:
- Filtering only by log level. TaN lacks filtering by modules or components, e.g. Java logging and Python logging.
No forwarding to central logging place like syslog.
Link To Logging Practices
- Log4j Best Practices This article claims that good logs are usable for grep (greppable logs)
- Discussion about best logging practices
- Blog article about good logging practicies
- Log check list
- Article "Effective logging practices ease enterprise development"
- Filters for rsyslog
requires these additional lines:
Note: This assumes that the length of each log message is below 4096!
All argos specific log messages will go to
. The following entry in
avoids the log messages of the services to appear in
Argos logging files can grow up very quickly. A logrotate configuration file is automatically generated from the index file during installation of the common software. In order to trigger the rotation of the ARGOS logs, a cron task must be invoked. Current setup defines a daily rotation, including compression, and 20 days of backup. Empty log files will not be rotated.
In /etc/crontab, the entry depends on the host:
0 7 * * * root /home/argos/bin/argos_dx_lalas_logrotate
Cron fails to execute the logrotate scripts because of SELinux. Here is the way to disabling SELinux in file
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
After the next reboot, SELinux is disabled.
To disabling SELinux without rebooting, this command will help:
echo 0 >/selinux/enforce