mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Find correct zeek namespace in debug logger macros.
These macros forward to functionality in `zeek::detail::debug_logger` and are not intended for customization. This patch fixes the macros to always use `::zeek::detail::debug_logger` as without the leading `::` lookup could happen in any potentially local namespace `zeek` which does not need to provide this symbol. This closes zeek/spicy#597.
This commit is contained in:
parent
218c24f55b
commit
b42396340e
1 changed files with 7 additions and 7 deletions
|
@ -12,15 +12,15 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#define DBG_LOG(stream, args...) \
|
#define DBG_LOG(stream, args...) \
|
||||||
if ( zeek::detail::debug_logger.IsEnabled(stream) ) \
|
if ( ::zeek::detail::debug_logger.IsEnabled(stream) ) \
|
||||||
zeek::detail::debug_logger.Log(stream, args)
|
::zeek::detail::debug_logger.Log(stream, args)
|
||||||
#define DBG_LOG_VERBOSE(stream, args...) \
|
#define DBG_LOG_VERBOSE(stream, args...) \
|
||||||
if ( zeek::detail::debug_logger.IsVerbose() && zeek::detail::debug_logger.IsEnabled(stream) ) \
|
if ( ::zeek::detail::debug_logger.IsVerbose() && ::zeek::detail::debug_logger.IsEnabled(stream) ) \
|
||||||
zeek::detail::debug_logger.Log(stream, args)
|
::zeek::detail::debug_logger.Log(stream, args)
|
||||||
#define DBG_PUSH(stream) zeek::detail::debug_logger.PushIndent(stream)
|
#define DBG_PUSH(stream) ::zeek::detail::debug_logger.PushIndent(stream)
|
||||||
#define DBG_POP(stream) zeek::detail::debug_logger.PopIndent(stream)
|
#define DBG_POP(stream) ::zeek::detail::debug_logger.PopIndent(stream)
|
||||||
|
|
||||||
#define PLUGIN_DBG_LOG(plugin, args...) zeek::detail::debug_logger.Log(plugin, args)
|
#define PLUGIN_DBG_LOG(plugin, args...) ::zeek::detail::debug_logger.Log(plugin, args)
|
||||||
|
|
||||||
ZEEK_FORWARD_DECLARE_NAMESPACED(Plugin, zeek, plugin);
|
ZEEK_FORWARD_DECLARE_NAMESPACED(Plugin, zeek, plugin);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue