Most* components are equipped with runtime logging features. This means they log information on what's going on with the device.
Logging can be done either to syslog, or to the standard output, and the logging level can be configured as desired. These options are controlled at multiple levels:
If you are unsure about which app specific configuration file to use, please run the application with --help to get more details. It will output something like this:
System configuration file : /opt/etc/agocontrol/conf.d/system.conf App-specific configuration file: /opt/etc/agocontrol/conf.d/rpc.conf
If you don't get this in the output, it means the application have not yet been given support for proper logging.
(* Most currently means in #develop branch only, in all of the core devices, and sporadically in other devices. This should be worked on!)
Logging method is how we log. This can either be console or syslog. In the configuration files, this is controlled with the log_method directive, and in case of syslog, the syslog_facility directive:
# log methods: console, syslog log_method=syslog syslog_facility = local0
Please note that by syslog facility local0 is used by default. This is generally NOT configured on a standard syslog setup. Please refer to system specific documentation on how to configure syslog.
When doing any kind of time-sensitive debugging, do not rely on syslog. The timestamps will not be nearly as accurate as the console logging (syslog timestamps are generated in syslogd, not when the actual logging statement is executed, thus room for a lot of inaccuracy).
How much we log is controlled by the logging level. Recommended for normal run mode is INFO or WARNING. Be aware that DEBUG will produce a lot of output, and TRACE even more. This is not recommended for normal running, but may be very useful when debugging issues.
In the configuration files, this is controlled with the "log_level" directive:
# log levels: TRACE, DEBUG, INFO, WARNING, ERROR, FATAL log_level=INFO
All of the above can be overriden with local command line options to the specific app:
--log-level arg Log level. Valid values are one of TRACE, DEBUG, INFO, WARNING, ERROR, FATAL --log-method arg Where to log. Valid values are one of console, syslog --log-syslog-facility arg Which syslog facility to log to. Valid values are on of auth, authpriv, console, cron, daemon, ftp, kern, local0, local1, local2, local3, local4, local5, local6, local7, lpr, mail, news, ntp, security, syslog, user, uucp -d [ --debug ] Shortcut to set console logging with level DEBUG -t [ --trace ] Shortcut to set console logging with level TRACE
Command line options always override configuration files.