Next: , Previous: , Up: smapd   [Contents][Index]


3.2 Logging

The server determines automatically where its diagnostics output should go. By default, it goes to standard error. However, after detaching from the terminal in standalone mode, smapd sends diagnostics to syslog, using facility ‘daemon’ by default. The same applies also if its standard input is not attached to a terminal.

Two command line options are provided to manually alter these defaults. The --stderr (-e) option instructs smapd to always send its diagnostics to the standard error, In contrast, the --syslog (-l) option forces it to use syslog.

The log facility can be changed in configuration file, using the ‘log-facility’ statement (see log-facility), or in the command line, using the --log-facility (-F) option. In both cases, the argument is the facility number or symbolic name. Valid names are: ‘user’, ‘daemon’, ‘auth’, ‘authpriv’, ‘mail’, ‘cron’, and ‘local0’ through ‘local7’.

Similarly, the log tag can also be changed, either from the configuration file, using the ‘log-tag’ statement, or from the command line, using the --log-tag (-L) option,