- // Print: Program name, PID, severity string, function name first
- fprintf(stderr, "%s [%d] : %s : %s - ", g_options.program, getpid(), severity, funct);
-
- // Then pass additional arguments with the format string to vfprintf for printing
- va_list va;
- va_start(va, fmt);
- vfprintf(stderr, fmt, va);
- va_end(va);
-
- // End log messages with a newline
- fprintf(stderr, "\n");
+ syslog(level, "%s: %s (%s:%d) - %s", severity, funct, file, line, buffer);