X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Flogger.c;h=461202937d76f6db1d476246718752e2d630a373;hp=2b4c7e388ed007a0367969ae6578ba29295452fe;hb=084ba04f51441098c55d3bd21b11bbe368e7b52e;hpb=7139dc96be39abcdcf7f20e134a5e9b8abce05c4 diff --git a/src/logger.c b/src/logger.c index 2b4c7e38..46120293 100644 --- a/src/logger.c +++ b/src/logger.c @@ -25,7 +25,6 @@ #include "names.h" #include "logger.h" #include "connection.h" -#include "control_common.h" #include "sptps.h" debug_t debug_level = DEBUG_NOTHING; @@ -36,8 +35,6 @@ static FILE *logfile = NULL; static HANDLE loghandle = NULL; #endif static const char *logident = NULL; -bool logcontrol = false; - static void real_logger(int level, int priority, const char *message) { char timestr[32] = ""; @@ -47,7 +44,7 @@ static void real_logger(int level, int priority, const char *message) { if(suppress) return; - if(!logcontrol && (level > debug_level || logmode == LOGMODE_NULL)) + if(level > debug_level || logmode == LOGMODE_NULL) return; if(level <= debug_level) { @@ -80,22 +77,6 @@ static void real_logger(int level, int priority, const char *message) { break; } } - - if(logcontrol) { - suppress = true; - logcontrol = false; - for list_each(connection_t, c, connection_list) { - if(!c->status.log) - continue; - logcontrol = true; - if(level > (c->outcompression >= 0 ? c->outcompression : debug_level)) - continue; - int len = strlen(message); - if(send_request(c, "%d %d %d", CONTROL, REQ_LOG, len)) - send_meta(c, message, len); - } - suppress = false; - } } void logger(int level, int priority, const char *format, ...) {