Merge "core/logging: Fix broken syslog levels on older glibc." into 13

This commit is contained in:
zuul
2016-03-25 13:38:37 -05:00
committed by Gerrit Code Review

View File

@@ -1322,7 +1322,8 @@ static void ast_log_vsyslog(struct logmsg *msg, int facility)
return;
}
syslog_level = LOG_MAKEPRI(facility, syslog_level);
/* Don't use LOG_MAKEPRI because it's broken in glibc<2.17 */
syslog_level = facility | syslog_level; /* LOG_MAKEPRI(facility, syslog_level); */
snprintf(buf, sizeof(buf), "%s[%d]%s: %s:%d in %s: %s",
levels[msg->level], msg->lwp, call_identifier_str, msg->file, msg->line, msg->function, msg->message);