time_t time = date.tv_sec;
char *hdr, *hdr_ptr;
size_t hdr_size;
- struct buffer *tag = &global.log_tag;
int fac_level;
int *plogfd;
char *pid_sep1 = "", *pid_sep2 = "";
int hdr_max = 0;
int tag_max = 0;
int pid_sep1_max = 0;
+ int pid_max = 0;
int pid_sep2_max = 0;
int sd_max = 0;
int max = 0;
maxlen = logsrv->maxlen - hdr_max;
/* tag */
- tag_max = tag->data;
+ tag_max = tag_size;
if (unlikely(tag_max >= maxlen)) {
tag_max = maxlen - 1;
sd_max = 0;
maxlen -= pid_sep1_max;
/* pid */
+ pid_max = pid_size;
if (unlikely(pid_size >= maxlen)) {
pid_size = maxlen - 1;
sd_max = 0;
iovec[0].iov_base = hdr_ptr;
iovec[0].iov_len = hdr_max;
iovec[1].iov_base = tag_str;
- iovec[1].iov_len = tag_size;
+ iovec[1].iov_len = tag_max;
iovec[2].iov_base = pid_sep1;
iovec[2].iov_len = pid_sep1_max;
iovec[3].iov_base = pid_str;
- iovec[3].iov_len = pid_size;
+ iovec[3].iov_len = pid_max;
iovec[4].iov_base = pid_sep2;
iovec[4].iov_len = pid_sep2_max;
iovec[5].iov_base = sd;