added module to handle log
[ppastats.git] / src / main.c
index 94f6f8d..4f3a227 100644 (file)
 
 #include "cache.h"
 #include "html.h"
+#include "log.h"
 #include "lp_ws.h"
 #include "config.h"
 #include "ppastats.h"
 
-int debug;
 static const char *program_name;
 
 static void display_published_binaries(const char *owner,
@@ -168,7 +168,7 @@ int main(int argc, char **argv)
                        output_dir = strdup(optarg);
                        break;
                case 'd':
-                       debug = 1;
+                       log_level = LOG_DEBUG;
                        break;
                case 'h':
                        print_help();