improved debug message
This commit is contained in:
parent
257bb22e80
commit
389a657170
|
@ -143,9 +143,12 @@ fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add,
|
|||
(void) fi;
|
||||
LinkTable *linktbl;
|
||||
|
||||
#ifdef DEBUG
|
||||
static int j = 0;
|
||||
lprintf(debug, "\n!!!!Calling fs_readdir for the %d time!!!!\n", j)
|
||||
j++;
|
||||
#endif
|
||||
|
||||
linktbl = path_to_Link_LinkTable_new(path);
|
||||
if (!linktbl) {
|
||||
return -ENOENT;
|
||||
|
|
|
@ -644,9 +644,12 @@ LinkTable *LinkTable_new(const char *url)
|
|||
curl_free(unescaped_path);
|
||||
curl_easy_cleanup(c);
|
||||
|
||||
#ifdef DEBUG
|
||||
static int i = 0;
|
||||
lprintf(debug, "\n!!!!Calling LinkTable_new for the %d time!!!!\n", i)
|
||||
i++;
|
||||
#endif
|
||||
|
||||
LinkTable_print(linktbl);
|
||||
|
||||
return linktbl;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef LOG_H
|
||||
#define LOG_H
|
||||
|
||||
#define DEBUG 0
|
||||
/**
|
||||
* \brief Log types
|
||||
*/
|
||||
|
@ -9,7 +10,7 @@ typedef enum {
|
|||
error = 1 << 1,
|
||||
warning = 1 << 2,
|
||||
info = 1 << 3,
|
||||
debug = 1 << 4,
|
||||
debug = DEBUG << 4,
|
||||
link_lock_debug = 1 << 5,
|
||||
network_lock_debug = 1 << 6,
|
||||
cache_lock_debug = 1 << 7,
|
||||
|
@ -40,9 +41,10 @@ void log_printf(LogType type, const char *file, const char *func, int line,
|
|||
*/
|
||||
#define lprintf(type, ...) \
|
||||
log_printf(type, __FILE__, __func__, __LINE__, __VA_ARGS__);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Print the version information for HTTPDirFS
|
||||
*/
|
||||
void print_version();
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue