Added spec:commit task to commit changes to spec/ruby sources.
[rbx.git] / shotgun / lib / log.c
blob5e999110ef9725dd8de2a85c4c1b41a05bbded0c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <stdarg.h>
5 static int debug_enabled = 0;
7 void debug_enable() {
8 debug_enabled = 1;
11 void debug_disable() {
12 debug_enabled = 0;
15 void log_debug(const char *fmt, ...) {
16 if(!debug_enabled) return;
17 printf("DEBUG: ");
18 va_list ap;
19 va_start(ap, fmt);
20 (void) vprintf(fmt, ap);
21 va_end(ap);
22 return;