From 142f890314a2279a383a70251e1579f277c408e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Mon, 5 Jun 2017 12:53:07 +0200 Subject: [PATCH] Allows to enforce prefixed verbose messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I41aa310f6898d5578b8de296d3b637c0d3595b1b Signed-off-by: José Bollo --- include/afb/afb-binding.h | 58 ++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/include/afb/afb-binding.h b/include/afb/afb-binding.h index 682dcbd6..3215c594 100644 --- a/include/afb/afb-binding.h +++ b/include/afb/afb-binding.h @@ -141,17 +141,17 @@ typedef struct afb_service_itf afb_service_itf; # if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO) -# define ERROR AFB_ERROR_V1 -# define WARNING AFB_WARNING_V1 -# define NOTICE AFB_NOTICE_V1 -# define INFO AFB_INFO_V1 -# define DEBUG AFB_DEBUG_V1 - -# define REQ_ERROR AFB_REQ_ERROR_V1 -# define REQ_WARNING AFB_REQ_WARNING_V1 -# define REQ_NOTICE AFB_REQ_NOTICE_V1 -# define REQ_INFO AFB_REQ_INFO_V1 -# define REQ_DEBUG AFB_REQ_DEBUG_V1 +# define AFB_ERROR AFB_ERROR_V1 +# define AFB_WARNING AFB_WARNING_V1 +# define AFB_NOTICE AFB_NOTICE_V1 +# define AFB_INFO AFB_INFO_V1 +# define AFB_DEBUG AFB_DEBUG_V1 + +# define AFB_REQ_ERROR AFB_REQ_ERROR_V1 +# define AFB_REQ_WARNING AFB_REQ_WARNING_V1 +# define AFB_REQ_NOTICE AFB_REQ_NOTICE_V1 +# define AFB_REQ_INFO AFB_REQ_INFO_V1 +# define AFB_REQ_DEBUG AFB_REQ_DEBUG_V1 # endif @@ -195,17 +195,17 @@ typedef struct afb_service_itf afb_service_itf; # if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO) -# define ERROR AFB_ERROR_V2 -# define WARNING AFB_WARNING_V2 -# define NOTICE AFB_NOTICE_V2 -# define INFO AFB_INFO_V2 -# define DEBUG AFB_DEBUG_V2 +# define AFB_ERROR AFB_ERROR_V2 +# define AFB_WARNING AFB_WARNING_V2 +# define AFB_NOTICE AFB_NOTICE_V2 +# define AFB_INFO AFB_INFO_V2 +# define AFB_DEBUG AFB_DEBUG_V2 -# define REQ_ERROR AFB_REQ_ERROR_V2 -# define REQ_WARNING AFB_REQ_WARNING_V2 -# define REQ_NOTICE AFB_REQ_NOTICE_V2 -# define REQ_INFO AFB_REQ_INFO_V2 -# define REQ_DEBUG AFB_REQ_DEBUG_V2 +# define AFB_REQ_ERROR AFB_REQ_ERROR_V2 +# define AFB_REQ_WARNING AFB_REQ_WARNING_V2 +# define AFB_REQ_NOTICE AFB_REQ_NOTICE_V2 +# define AFB_REQ_INFO AFB_REQ_INFO_V2 +# define AFB_REQ_DEBUG AFB_REQ_DEBUG_V2 # endif @@ -229,3 +229,19 @@ typedef struct afb_service_itf afb_service_itf; #endif +#if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_UNPREFIX) +# if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO) +# define ERROR AFB_ERROR +# define WARNING AFB_WARNING +# define NOTICE AFB_NOTICE +# define INFO AFB_INFO +# define DEBUG AFB_DEBUG + +# define REQ_ERROR AFB_REQ_ERROR +# define REQ_WARNING AFB_REQ_WARNING +# define REQ_NOTICE AFB_REQ_NOTICE +# define REQ_INFO AFB_REQ_INFO +# define REQ_DEBUG AFB_REQ_DEBUG +# endif +#endif + -- 2.16.6