X-Git-Url: https://ruderich.org/simon/gitweb/?p=socket2unix%2Fsocket2unix.git;a=blobdiff_plain;f=src%2Fsocket2unix.c;h=e9123879fd8129f4c3b2d6e53f3ae3439267760d;hp=848a40bf68745eecf0fd9dd2bf3416d65ace8e61;hb=3b737887f3c99558356bd101922e80b1361740e1;hpb=39b505e0c28b8ee39bef37174cd12b0981b07d20 diff --git a/src/socket2unix.c b/src/socket2unix.c index 848a40b..e912387 100644 --- a/src/socket2unix.c +++ b/src/socket2unix.c @@ -22,6 +22,8 @@ /* Necessary for RTLD_NEXT. */ #define _GNU_SOURCE +#include + #include #include #include @@ -197,7 +199,11 @@ static const char *get_socket_path(void) { static int get_log_level(void) { const char *level = getenv("SOCKET2UNIX_DEBUG"); if (!level) { +#ifdef DEBUG + return LOG_LEVEL_DEBUG; +#else return LOG_LEVEL_WARNING; +#endif } int number = atoi(level); if (number <= 0 || number > LOG_LEVEL_DEBUG) {