Copyright (C) 2000-2012 |
GNU Info (am-utils.info)-l Option`-l' LOG-OPTION =============== Selects the form of logging to be made. Several special "log-options" are recognized. 1. If "log-option" is the string `syslog', Amd will use the syslog(3) mechanism. If your system supports syslog facilities, then the default facility used is `LOG_DAEMON'. 2. When using syslog, if you wish to change the facility, append its name to the log option name, delimited by a single colon. For example, if "log-options" is the string `syslog:local7' then Amd will log messages via syslog(3) using the `LOG_LOCAL7' facility. If the facility name specified is not recognized, Amd will default to `LOG_DAEMON'. Note: while you can use any syslog facility available on your system, it is generally a bad idea to use those reserved for other services such as `kern', `lpr', `cron', etc. 3. If "log-option" is the string `/dev/stderr', Amd will use standard error, which is also the default target for log messages. To implement this, Amd simulates the effect of the `/dev/fd' driver. Any other string is taken as a filename to use for logging. Log messages are appended to the file if it already exists, otherwise a new file is created. The file is opened once and then held open, rather than being re-opened for each message. Normally, when long-running daemons hold an open file descriptor on a log file, it is impossible to "rotate" the log file and compress older logs on a daily basis. The daemon needs to be told to discard (via close(2)) its file handle, and re-open the log file. This is done using `amq -l' log-option. Note: Amq -l option. If the `syslog' option is specified but the system does not support syslog or if the named file cannot be opened or created, Amd will use standard error. Error messages generated before Amd has finished parsing the command line are printed on standard error. Since Amd tends to generate a lot of logging information (especially if debugging was turned on), and due to it being an important program running on the system, it is usually best to log to a separate disk file. In that case Amd would be started as follows: amd -l /var/log/amd ... automatically generated by info2www version 1.2.2.9 |