static void unload_log_targets();
static int reload_log_targets(int init);
+#ifdef HAVE_THREADS
+static pthread_mutex_t log_sync;
+#endif
#define LOG_TARGET_TYPE_FILE 1
#define LOG_TARGET_TYPE_STDOUT 2
if(!(target->section & section))
continue;
if(target->type == LOG_TARGET_TYPE_IRC) {
- if(section == LOG_IRCRAW || (!stricmp(module, "iohandler") && section == LOG_DEBUG))
+ if(section == LOG_IRCRAW || !stricmp(module, "iohandler"))
continue; //endless loop ;)
struct ChanNode *channel = getChanByName(target->target.channel);
struct ClientSocket *client;
}
void init_log() {
+ #if HAVE_THREADS
+ THREAD_MUTEX_INIT(log_sync);
+ #endif
load_log_targets();
bind_reload(reload_log_targets, 0);
iolog_backend = log_iohandler_backend;