Lines Matching refs:len

70 	size_t len;  in zlog_print_time()  local
72len = strftime(timebuf, timebuf_len, "[%d-%b-%Y %H:%M:%S", localtime_r((const time_t *) &tv->tv_se… in zlog_print_time()
74 len += snprintf(timebuf + len, timebuf_len - len, ".%06d", (int) tv->tv_usec); in zlog_print_time()
76 len += snprintf(timebuf + len, timebuf_len - len, "] "); in zlog_print_time()
77 return len; in zlog_print_time()
107 size_t len = 0; in zlog_ex() local
113 len = vsnprintf(buf, buf_size, fmt, args); in zlog_ex()
115 if (len >= buf_size) { in zlog_ex()
117 len = buf_size - 1; in zlog_ex()
119 external_logger(flags & ZLOG_LEVEL_MASK, buf, len); in zlog_ex()
120 len = 0; in zlog_ex()
131 len = 0; in zlog_ex()
133len += 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()
146len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG… in zlog_ex()
148len += 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()
155 if (len > buf_size - 1) { in zlog_ex()
161 len += vsnprintf(buf + len, buf_size - len, fmt, args); in zlog_ex()
163 if (len >= buf_size) { in zlog_ex()
170 len += snprintf(buf + len, buf_size - len, ": %s (%d)", strerror(saved_errno), saved_errno); in zlog_ex()
171 if (len >= buf_size) { in zlog_ex()
179 len = buf_size - 1; in zlog_ex()
184 buf[len] = '\0'; 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()