2 *------------------------------------------------------------------
3 * Copyright (c) 2017 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *------------------------------------------------------------------
18 #ifndef __included_vapi_debug_h__
19 #define __included_vapi_debug_h__
21 /* controls debug prints */
22 #define VAPI_DEBUG (0)
23 #define VAPI_DEBUG_CONNECT (0)
24 #define VAPI_DEBUG_ALLOC (0)
25 #define VAPI_CPP_DEBUG_LEAKS (0)
29 #define VAPI_DEBUG_FILE_DEF \
30 static const char *__file = NULL; \
32 __file = strrchr (__FILE__, '/'); \
43 #define VAPI_DBG(fmt, ...) \
47 printf ("DBG:%s:%d:%s():" fmt, __file, __LINE__, __func__, \
54 #define VAPI_ERR(fmt, ...) \
58 printf ("ERR:%s:%d:%s():" fmt, __file, __LINE__, __func__, \
69 #endif /* __included_vapi_debug_h__ */
72 * fd.io coding-style-patch-verification: ON
75 * eval: (c-set-style "gnu")