Home | History | Annotate | Line # | Download | only in libhack
syslog.c revision 1.3
      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 }
     20 
     21 __strong_alias(_syslog, syslog)
     22 void
     23 syslog(int fac, const char *fmt, ...)
     24 {
     25 	va_list ap;
     26 	va_start(ap, fmt);
     27 	(void)vfprintf(stderr, fmt, ap);
     28 	va_end(ap);
     29 	(void)fprintf(stderr, "\n");
     30 	fflush(stderr);
     31 }
     32 
     33 __strong_alias(_vsyslog, vsyslog)
     34 void
     35 vsyslog(int fac, const char *fmt, va_list ap)
     36 {
     37 	(void)vfprintf(stderr, fmt, ap);
     38 	(void)fprintf(stderr, "\n");
     39 	fflush(stderr);
     40 }
     41