Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / usr / src / cmd / ipf / lib / common / printlog.c
blob920f1bb0c483a6684e0c69f049332511902ba054
1 /*
2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * $Id: printlog.c,v 1.6 2002/01/28 06:50:47 darrenr Exp $
7 */
9 #include "ipf.h"
11 #include <syslog.h>
14 void printlog(fp)
15 frentry_t *fp;
17 char *s, *u;
19 printf("log");
20 if (fp->fr_flags & FR_LOGBODY)
21 printf(" body");
22 if (fp->fr_flags & FR_LOGFIRST)
23 printf(" first");
24 if (fp->fr_flags & FR_LOGORBLOCK)
25 printf(" or-block");
26 if (fp->fr_loglevel != 0xffff) {
27 printf(" level ");
28 if (fp->fr_loglevel & LOG_FACMASK) {
29 s = fac_toname(fp->fr_loglevel);
30 if (s == NULL)
31 s = "!!!";
32 } else
33 s = "";
34 u = pri_toname(fp->fr_loglevel);
35 if (u == NULL)
36 u = "!!!";
37 if (*s)
38 printf("%s.%s", s, u);
39 else
40 printf("%s", u);