michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef CC_DEBUG_H_ michael@0: #define CC_DEBUG_H_ michael@0: #include "cc_types.h" michael@0: #include michael@0: michael@0: extern cc_int32_t VCMDebug; michael@0: extern cc_int32_t PLATDebug; michael@0: michael@0: #ifndef PLAT_ERROR michael@0: #define PLAT_ERROR(format, ...) CSFLogError("plat" , format , ## __VA_ARGS__ ) michael@0: #endif michael@0: michael@0: #ifndef VCM_ERR michael@0: #define VCM_ERR(format, ...) CSFLogError("vcm" , format , ## __VA_ARGS__ ) michael@0: #endif michael@0: michael@0: #ifndef VCM_DEBUG michael@0: #define VCM_DEBUG(format, ...) CSFLogDebug("vcm" , format , ## __VA_ARGS__ ) michael@0: #endif michael@0: michael@0: michael@0: //DEBUG message prefixes michael@0: #define PLAT_F_PREFIX "PLAT : %s : " michael@0: #define PLAT_A_F_PREFIX "PLAT : %s : %s :" michael@0: #define PLAT_L_C_F_PREFIX "PLAT : %d/%d : %s : " // line/call/fname as arg michael@0: #define VCM_F_PREFIX "VCM : %s : " michael@0: #define VCM_A_F_PREFIX "VCM : %s : %s :" michael@0: #define VCM_L_C_F_PREFIX "%s : %d/%d : %s : " // line/call/fname as arg michael@0: #define PLAT_F_PREFIX_ARGS(msg_name, func_name) msg_name, func_name michael@0: #define PLAT_L_C_F_PREFIX_ARGS(msg_name, line, call_id, func_name) \ michael@0: msg_name, line, call_id, func_name michael@0: michael@0: michael@0: // michael@0: #define PLAT_API "PLAT_API" // platform API michael@0: #define VCM_API "VCM_API" // vcm api michael@0: michael@0: #endif /* CC_DEBUG_H_ */