| 120 | } |
| 121 | |
| 122 | static void logit(int priority, const char *buf) |
| 123 | { |
| 124 | if (logfile_was_closed) |
| 125 | logfile_reopen(); |
| 126 | if (logfile_fp) { |
| 127 | fprintf(logfile_fp, "%s [%d] %s", timestring(time(NULL)), (int)getpid(), buf); |
| 128 | fflush(logfile_fp); |
| 129 | } else { |
| 130 | syslog(priority, "%s", buf); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | static void syslog_init() |
| 135 | { |
no test coverage detected