better logging
[ppastats.git] / src / http.c
index 7fda573..99a6db3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 jeanfi@gmail.com
+ * Copyright (C) 2011-2014 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -28,9 +28,9 @@
 
 #include "fcache.h"
 #include "http.h"
-#include "log.h"
+#include <plog.h>
 
-static const int DEFAULT_FETCH_RETRIES = 10;
+static const int DEFAULT_FETCH_RETRIES = 15;
 
 static CURL *curl;
 
@@ -139,10 +139,12 @@ static char *fetch_url(const char *url)
 
 void http_cleanup()
 {
-       log_debug(_("cleanup CURL"));
+       log_fct_enter();
 
        curl_easy_cleanup(curl);
        curl_global_cleanup();
+
+       log_fct_exit();
 }
 
 char *get_url_content(const char *url, unsigned int use_cache)
@@ -162,4 +164,3 @@ char *get_url_content(const char *url, unsigned int use_cache)
 
        return content;
 }
-