Lines Matching refs:buf
104 char buf[MAX_LINE_LENGTH]; in zlog_ex() local
113 len = vsnprintf(buf, buf_size, fmt, args); in zlog_ex()
116 memcpy(buf + buf_size - sizeof("..."), "...", sizeof("...") - 1); in zlog_ex()
119 external_logger(flags & ZLOG_LEVEL_MASK, buf, len); in zlog_ex()
121 memset(buf, '\0', buf_size); in zlog_ex()
133 …len += snprintf(buf, buf_size, "[%s] %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], funct… in zlog_ex()
135 len += snprintf(buf, buf_size, "[%s] ", level_names[flags & ZLOG_LEVEL_MASK]); in zlog_ex()
142 len = zlog_print_time(&tv, buf, buf_size); in zlog_ex()
146 …len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG… in zlog_ex()
148 …len += snprintf(buf + len, buf_size - len, "%s: %s(), line %d: ", level_names[flags & ZLOG_LEVEL_M… in zlog_ex()
151 len += snprintf(buf + len, buf_size - len, "%s: ", level_names[flags & ZLOG_LEVEL_MASK]); in zlog_ex()
161 len += vsnprintf(buf + len, buf_size - len, fmt, args); in zlog_ex()
170 len += snprintf(buf + len, buf_size - len, ": %s (%d)", strerror(saved_errno), saved_errno); in zlog_ex()
178 memcpy(buf + buf_size - sizeof("..."), "...", sizeof("...") - 1); in zlog_ex()
184 buf[len] = '\0'; in zlog_ex()
185 php_syslog(syslog_priorities[zlog_level], "%s", buf); in zlog_ex()
186 buf[len++] = '\n'; in zlog_ex()
190 buf[len++] = '\n'; in zlog_ex()
191 write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len); in zlog_ex()
195 write(STDERR_FILENO, buf, len); in zlog_ex()