summaryrefslogtreecommitdiff
path: root/src/common/log.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-12-21 15:44:50 -0500
committerNick Mathewson <nickm@torproject.org>2010-12-21 15:44:50 -0500
commit69771bb5fc0fc472436c5f3fe6dfd3bd0f4929da (patch)
tree4f359f5fdb23bec103f67b08aff4c659bde8b929 /src/common/log.c
parentef5b3680c6c4f630b670681f73967f4535b786e1 (diff)
parent668f7a2639faf59e5bc4f2615e61e0e768e0b26d (diff)
downloadtor-69771bb5fc0fc472436c5f3fe6dfd3bd0f4929da.tar.gz
tor-69771bb5fc0fc472436c5f3fe6dfd3bd0f4929da.zip
Merge remote branch 'public/bug2190_021' into maint-0.2.1
Diffstat (limited to 'src/common/log.c')
-rw-r--r--src/common/log.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 6baef8e26c..da55f4fe0e 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -280,6 +280,10 @@ logv(int severity, log_domain_mask_t domain, const char *funcname,
lf = lf->next;
continue;
}
+ if (lf->callback && (domain & LD_NOCB)) {
+ lf = lf->next;
+ continue;
+ }
if (lf->seems_dead) {
lf = lf->next;
continue;
@@ -943,19 +947,19 @@ libevent_logging_callback(int severity, const char *msg)
}
switch (severity) {
case _EVENT_LOG_DEBUG:
- log(LOG_DEBUG, LD_NET, "Message from libevent: %s", buf);
+ log(LOG_DEBUG, LD_NOCB|LD_NET, "Message from libevent: %s", buf);
break;
case _EVENT_LOG_MSG:
- log(LOG_INFO, LD_NET, "Message from libevent: %s", buf);
+ log(LOG_INFO, LD_NOCB|LD_NET, "Message from libevent: %s", buf);
break;
case _EVENT_LOG_WARN:
- log(LOG_WARN, LD_GENERAL, "Warning from libevent: %s", buf);
+ log(LOG_WARN, LD_NOCB|LD_GENERAL, "Warning from libevent: %s", buf);
break;
case _EVENT_LOG_ERR:
- log(LOG_ERR, LD_GENERAL, "Error from libevent: %s", buf);
+ log(LOG_ERR, LD_NOCB|LD_GENERAL, "Error from libevent: %s", buf);
break;
default:
- log(LOG_WARN, LD_GENERAL, "Message [%d] from libevent: %s",
+ log(LOG_WARN, LD_NOCB|LD_GENERAL, "Message [%d] from libevent: %s",
severity, buf);
break;
}