Home | History | Annotate | Line # | Download | only in libhack
syslog.c revision 1.4
      1 #include <sys/types.h>
      2 #include <sys/syslog.h>
      3 #include <stdio.h>
      4 #include <stdarg.h>
      5 
      6 void
      7 openlog(const char *path, int opt, int fac)
      8 {
      9 }
     10 
     11 void
     12 closelog(void)
     13 {
     14 }
     15 
     16 int
     17 setlogmask(int mask)
     18 {
     19 	return 0xff;
     20 }
     21 
     22 __strong_alias(_syslog, syslog)
     23 void
     24 syslog(int fac, const char *fmt, ...)
     25 {
     26 	va_list ap;
     27 	va_start(ap, fmt);
     28 	(void)vfprintf(stderr, fmt, ap);
     29 	va_end(ap);
     30 	(void)fprintf(stderr, "\n");
     31 	fflush(stderr);
     32 }
     33 
     34 __strong_alias(_vsyslog, vsyslog)
     35 void
     36 vsyslog(int fac, const char *fmt, va_list ap)
     37 {
     38 	(void)vfprintf(stderr, fmt, ap);
     39 	(void)fprintf(stderr, "\n");
     40 	fflush(stderr);
     41 }
     42