3 * @author David Llewellyn-Jones
11 * @section DESCRIPTION
24 #include "contrac/log.h"
30 // Function prototypes
32 void log_priority(int priority
, const char *format
, ...) {
37 va_start(args
, format
);
38 length
= vsnprintf(NULL
, 0, format
, args
);
41 buffer
= malloc(sizeof(char) * (length
+ 1));
43 va_start(args
, format
);
44 length
= vsnprintf(buffer
, length
+ 1, format
, args
);
48 syslog(priority
, "%s", buffer
);
51 // Function definitions