Logo Search packages:      
Sourcecode: nagircbot version File versions  Download package

log.c

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <syslog.h>

void dolog(char *format, ...)
{
      char buffer[4096];
      va_list ap;

      va_start(ap, format);
      vsnprintf(buffer, sizeof(buffer), format, ap);
      va_end(ap);

      fprintf(stderr, "%s\n", buffer);
      syslog(LOG_ERR, "%s", buffer);
}

Generated by  Doxygen 1.6.0   Back to index