-#if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO)
-# if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS)
-# define AFB_ERROR_V2(daemon,...) do{if(afbBindingV2verbosity>=0)afb_daemon_verbose(daemon,3,__FILE__,__LINE__,__VA_ARGS__);}while(0)
-# define AFB_WARNING_V2(daemon,...) do{if(afbBindingV2verbosity>=1)afb_daemon_verbose(daemon,4,__FILE__,__LINE__,__VA_ARGS__);}while(0)
-# define AFB_NOTICE_V2(daemon,...) do{if(afbBindingV2verbosity>=1)afb_daemon_verbose(daemon,5,__FILE__,__LINE__,__VA_ARGS__);}while(0)
-# define AFB_INFO_V2(daemon,...) do{if(afbBindingV2verbosity>=2)afb_daemon_verbose(daemon,6,__FILE__,__LINE__,__VA_ARGS__);}while(0)
-# define AFB_DEBUG_V2(daemon,...) do{if(afbBindingV2verbosity>=3)afb_daemon_verbose(daemon,7,__FILE__,__LINE__,__VA_ARGS__);}while(0)
-# else
-# define AFB_ERROR_V2(daemon,...) do{if(afbBindingV2verbosity>=0)afb_daemon_verbose(daemon,3,NULL,0,__VA_ARGS__);}while(0)
-# define AFB_WARNING_V2(daemon,...) do{if(afbBindingV2verbosity>=1)afb_daemon_verbose(daemon,4,NULL,0,__VA_ARGS__);}while(0)
-# define AFB_NOTICE_V2(daemon,...) do{if(afbBindingV2verbosity>=1)afb_daemon_verbose(daemon,5,NULL,0,__VA_ARGS__);}while(0)
-# define AFB_INFO_V2(daemon,...) do{if(afbBindingV2verbosity>=2)afb_daemon_verbose(daemon,6,NULL,0,__VA_ARGS__);}while(0)
-# define AFB_DEBUG_V2(daemon,...) do{if(afbBindingV2verbosity>=3)afb_daemon_verbose(daemon,7,NULL,0,__VA_ARGS__);}while(0)
-# endif
+#if defined(AFB_BINDING_PRAGMA_NO_VERBOSE_DATA)
+
+#define AFB_VERBOSE_V2(level,...) \
+ do { if(level <= AFB_VERBOSITY_LEVEL_ERROR) \
+ afb_daemon_verbose_v2(level,__FILE__,__LINE__,NULL,__VA_ARGS__); \
+ else afb_daemon_verbose_v2(level,__FILE__,__LINE__,NULL); } while(0)
+
+#define AFB_REQ_VERBOSE_V2(req,level,...) \
+ do { if(level <= AFB_VERBOSITY_LEVEL_ERROR) \
+ afb_req_x1_verbose(req,level,__FILE__,__LINE__,NULL,__VA_ARGS__); \
+ else afb_req_x1_verbose(req,level,__FILE__,__LINE__,NULL); } while(0)
+
+#elif defined(AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS)
+
+#define AFB_VERBOSE_V2(level,...) \
+ afb_daemon_verbose_v2(level,NULL,0,NULL,__VA_ARGS__)
+
+#define AFB_REQ_VERBOSE_V2(req,level,...) \
+ afb_req_x1_verbose(req,level,NULL,0,NULL,__VA_ARGS__)
+
+#else
+
+#define AFB_VERBOSE_V2(level,...) \
+ afb_daemon_verbose_v2(level,__FILE__,__LINE__,__func__,__VA_ARGS__)
+
+#define AFB_REQ_VERBOSE_V2(req,level,...) \
+ afb_req_x1_verbose(req,level,__FILE__,__LINE__,__func__,__VA_ARGS__)
+
+#endif
+
+#define _AFB_LOGGING_V2_(vlevel,llevel,...) \
+ do{ if(afb_get_verbosity_v2()>=vlevel) AFB_VERBOSE_V2(llevel,__VA_ARGS__); } while(0)
+#define _AFB_REQ_LOGGING_V2_(vlevel,llevel,req,...) \
+ do{ if(afb_get_verbosity_v2()>=vlevel) AFB_REQ_VERBOSE_V2(req,llevel,__VA_ARGS__); } while(0)
+
+#define AFB_ERROR_V2(...) _AFB_LOGGING_V2_(AFB_VERBOSITY_LEVEL_ERROR,AFB_SYSLOG_LEVEL_ERROR,__VA_ARGS__)
+#define AFB_WARNING_V2(...) _AFB_LOGGING_V2_(AFB_VERBOSITY_LEVEL_WARNING,AFB_SYSLOG_LEVEL_WARNING,__VA_ARGS__)
+#define AFB_NOTICE_V2(...) _AFB_LOGGING_V2_(AFB_VERBOSITY_LEVEL_NOTICE,AFB_SYSLOG_LEVEL_NOTICE,__VA_ARGS__)
+#define AFB_INFO_V2(...) _AFB_LOGGING_V2_(AFB_VERBOSITY_LEVEL_INFO,AFB_SYSLOG_LEVEL_INFO,__VA_ARGS__)
+#define AFB_DEBUG_V2(...) _AFB_LOGGING_V2_(AFB_VERBOSITY_LEVEL_DEBUG,AFB_SYSLOG_LEVEL_DEBUG,__VA_ARGS__)
+#define AFB_REQ_ERROR_V2(...) _AFB_REQ_LOGGING_V2_(AFB_VERBOSITY_LEVEL_ERROR,AFB_SYSLOG_LEVEL_ERROR,__VA_ARGS__)
+#define AFB_REQ_WARNING_V2(...) _AFB_REQ_LOGGING_V2_(AFB_VERBOSITY_LEVEL_WARNING,AFB_SYSLOG_LEVEL_WARNING,__VA_ARGS__)
+#define AFB_REQ_NOTICE_V2(...) _AFB_REQ_LOGGING_V2_(AFB_VERBOSITY_LEVEL_NOTICE,AFB_SYSLOG_LEVEL_NOTICE,__VA_ARGS__)
+#define AFB_REQ_INFO_V2(...) _AFB_REQ_LOGGING_V2_(AFB_VERBOSITY_LEVEL_INFO,AFB_SYSLOG_LEVEL_INFO,__VA_ARGS__)
+#define AFB_REQ_DEBUG_V2(...) _AFB_REQ_LOGGING_V2_(AFB_VERBOSITY_LEVEL_DEBUG,AFB_SYSLOG_LEVEL_DEBUG,__VA_ARGS__)
+
+/******************************************************************************/
+
+#if 0 && AFB_BINDING_VERSION >= 2
+
+# define afb_verbose_error() (afb_get_verbosity() >= AFB_VERBOSITY_LEVEL_ERROR)
+# define afb_verbose_warning() (afb_get_verbosity() >= AFB_VERBOSITY_LEVEL_WARNING)
+# define afb_verbose_notice() (afb_get_verbosity() >= AFB_VERBOSITY_LEVEL_NOTICE)
+# define afb_verbose_info() (afb_get_verbosity() >= AFB_VERBOSITY_LEVEL_INFO)
+# define afb_verbose_debug() (afb_get_verbosity() >= AFB_VERBOSITY_LEVEL_DEBUG)
+