Lines Matching refs:file
14 usage: syslogd [-a socket] [-O logfile] [-f config file] [-m interval]
20 -O FILE Default log file <DEFAULT: /var/log/messages>
21 -f FILE Config file <DEFAULT: /etc/syslog.conf>
46 // Log file entry to log into.
96 * for evry file and updates facilty and log level bits.
98 static int resolve_config(struct logfile *file, char *config)
143 if (set & 0x1) file->facility[i] |= ~facval;
145 if (facval & 0x1) file->level[i] |= ~levval;
151 // Parse config file and update the log file list.
154 struct logfile *file;
165 file = xzalloc(sizeof(struct logfile));
166 file->filename = xstrdup("/dev/kmsg");
167 TT.lfiles = file;
177 file = xzalloc(sizeof(struct logfile));
178 file->filename = xmprintf("@%s",TT.remote_log);
179 TT.lfiles = file;
183 * Read config file and add logfiles to the list
206 file = TT.lfiles;
207 while (file && strcmp(file->filename, tk[1])) file = file->next;
208 if (!file) {
209 file = xzalloc(sizeof(struct logfile));
210 file->filename = xstrdup(tk[1]);
211 file->next = TT.lfiles;
212 TT.lfiles = file;
214 if (resolve_config(file, confline) == -1) {
222 * Can't open config file or support is not enabled
226 file = xzalloc(sizeof(struct logfile));
227 file->filename = xstrdup((toys.optflags & FLAG_O) ?
229 file->next = TT.lfiles;
230 TT.lfiles = file;
235 // open every log file in list.
277 //write to file with rotation
313 //Parse message and write to file.
366 if (wlen < 0) perror_msg("write failed file : %s ", tf->filename + isNetwork);