Xively Official / mbed-libxively-5d6fdd4

Dependents:   xively-jumpstart-demo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers xi_debug.h Source File

xi_debug.h

Go to the documentation of this file.
00001 // Copyright (c) 2003-2013, LogMeIn, Inc. All rights reserved.
00002 // This is part of Xively C library, it is under the BSD 3-Clause license.
00003 
00004 /**
00005  * \file    xi_debug.h
00006  * \author  Olgierd Humenczuk
00007  * \brief   Macros to use for debugging (relies on `xi_printf()`)
00008  */
00009 
00010 #ifndef __XI_DEBUG_H__
00011 #define __XI_DEBUG_H__
00012 
00013 #include "xi_printf.h"
00014 
00015 #ifdef XI_DEBUG_OUTPUT
00016     #define xi_debug_log_str(...) xi_printf( "[%d@%s] - %s", __LINE__, __FILE__, __VA_ARGS__ )
00017     #define xi_debug_log_data(...) xi_printf( "%s", __VA_ARGS__ )
00018     #define xi_debug_log_int(...) xi_printf( "%d", __VA_ARGS__ )
00019     #define xi_debug_log_endl(...) xi_printf( "\n" )
00020 #else
00021     #define xi_debug_log_str(...)
00022     #define xi_debug_log_data(...)
00023     #define xi_debug_log_int(...)
00024     #define xi_debug_log_endl(...)
00025 #endif
00026 
00027 #endif