Lines Matching refs:log
42 Syslog_state_t log = { LOG_USER, -1, 0, ~0 };
260 if (log.fd < 0)
264 if (log.attempt >= elementsof(attempt))
266 p = (Namval_t*)&attempt[log.attempt++];
267 if (p->value && !(p->value & log.flags))
271 if ((log.fd = open(s, O_WRONLY|O_APPEND|O_NOCTTY)) < 0 && (log.fd = sockopen(s)) < 0)
273 fcntl(log.fd, F_SETFD, FD_CLOEXEC);
275 if (!n || write(log.fd, msg, n) > 0)
277 close(log.fd);
278 log.fd = -1;
280 if (n && (log.flags & LOG_PERROR))
307 priority |= log.facility;
308 if (!(priority & log.mask))
313 if (log.flags & LOG_LEVEL)
327 if (!*log.host && gethostname(log.host, sizeof(log.host)-1))
328 strcpy(log.host, "localhost");
329 sfprintf(sp, " %s", log.host);
331 if (*log.ident)
332 sfprintf(sp, " %s", log.ident);
333 if (log.flags & LOG_PID)
335 if (!*log.ident)