- switch (kind) {
- case L_FATAL:
- syslog(LOG_ERR, "%s", buff);
- break;
- case L_ERROR:
- syslog(LOG_ERR, "%s", buff);
- break;
- case L_WARNING:
- syslog(LOG_WARNING, "%s", buff);
- break;
- case L_NOTICE:
- syslog(LOG_NOTICE, "%s", buff);
- break;
- default:
- logged = 0;
- break;
+ if (log_syslog) {
+ switch (kind) {
+ case L_FATAL:
+ syslog(LOG_ERR, "%s", buff);
+ break;
+ case L_ERROR:
+ syslog(LOG_ERR, "%s", buff);
+ break;
+ case L_WARNING:
+ syslog(LOG_WARNING, "%s", buff);
+ break;
+ case L_NOTICE:
+ syslog(LOG_NOTICE, "%s", buff);
+ break;
+ default:
+ if (!log_stderr)
+ syslog(LOG_INFO, "%s", buff);
+ break;
+ }