[asterisk-bugs] [JIRA] (ASTERISK-25407) Asterisk fails to log to multiple syslog destinations

Elazar Broad (JIRA) noreply at issues.asterisk.org
Sun Sep 20 23:10:33 CDT 2015


Elazar Broad created ASTERISK-25407:
---------------------------------------

             Summary: Asterisk fails to log to multiple syslog destinations
                 Key: ASTERISK-25407
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25407
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Core/Logging
    Affects Versions: SVN
         Environment: Slackware Linux x86-64
            Reporter: Elazar Broad
            Severity: Minor


When configuring more than one syslog destinations in logger.conf, Asterisk will only log to the last one in the configuration. For example:

syslog.local1 => error, warning, notice
syslog.local2 => security

Everything is logged to local2.

This is due to the fact that the final call to openlog() in make_log_channel() supersedes the previous calls. My humble suggestion would be to eliminate the openlog() call, as the syslog() call in ast_log_vsyslog() will open the log as needed; pass the channel facility to ast_log_vsyslog() and use the LOG_MAKEPRI macro to ensure the message is sent to the correct facility. I have tested this successfully on my system and will post a patch to reviewboard in the morning.

Thanks,
 Elazar



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list