From: Nick Mathewson Date: Mon, 12 Sep 2011 15:31:19 +0000 (-0400) Subject: Merge branch '21_enable_debugging' X-Git-Tag: release-2.1.1-alpha~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e20eabd69a43d40d199de6efbddf3105273df19b;p=libevent Merge branch '21_enable_debugging' --- e20eabd69a43d40d199de6efbddf3105273df19b diff --cc include/event2/event.h index fae5bb87,415116ed..b86bcc0c --- a/include/event2/event.h +++ b/include/event2/event.h @@@ -638,8 -310,28 +638,27 @@@ typedef void (*event_fatal_cb)(int err) Libevent will (almost) always log an _EVENT_LOG_ERR message before calling this function; look at the last log message to see why Libevent has died. */ -typedef void (*event_fatal_cb)(int err); void event_set_fatal_callback(event_fatal_cb cb); + #define EVENT_DBG_ALL 0xffffffffu + #define EVENT_DBG_NONE 0 + + /** + Turn on debugging logs and have them sent to the default log handler. + + This is a global setting; if you are going to call it, you must call this + before any calls that create an event-base. You must call it before any + multithreaded use of Libevent. + + Debug logs are verbose. + + @param which Controls which debug messages are turned on. This option is + unused for now; for forward compatibility, you must pass in the constant + "EVENT_DBG_ALL" to turn debugging logs on, or "EVENT_DBG_NONE" to turn + debugging logs off. + */ + void event_enable_debug_logging(ev_uint32_t which); + /** Associate a different event base with an event.