00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00025 #define _rMessageDef(ID, COMPONENT) \
00026 static rlog::PublishLoc ID ={&rlog::RLog_Register, 0, STR(COMPONENT), \
00027 __FILE__, __FUNCTION__, __LINE__, 0};
00028
00033 #if HAVE_PRINTF_FP || !HAVE_PRINTF_ATTR
00034 # define _rMessageCall(ID, CHANNEL, ...) \
00035 if(unlikely(ID.publish!=0)) (*ID.publish)( &ID, CHANNEL, ##__VA_ARGS__ );
00036 #else // no PRINTF attributes..
00037 # define _rMessageCall(ID, CHANNEL, ...) \
00038 if(unlikely(ID.publish!=0)) \
00039 { \
00040 (*ID.publish)( &ID, CHANNEL, ##__VA_ARGS__ ); \
00041 rlog::__checkArgs( 0, ##__VA_ARGS__ ); \
00042 }
00043 #endif
00044
00054 #define _rMessage(ID, CHANNEL, ... ) \
00055 do { _rMessageDef(ID, RLOG_COMPONENT) \
00056 _rMessageCall(ID, CHANNEL, ##__VA_ARGS__ ) } while(0)
00057
00082 #define rDebug(...) \
00083 _rMessage( LOGID, rlog::_RLDebugChannel, ##__VA_ARGS__ )
00084
00098 #define rInfo(...) \
00099 _rMessage( LOGID, rlog::_RLInfoChannel, ##__VA_ARGS__ )
00100
00118 #define rWarning(...) \
00119 _rMessage( LOGID, rlog::_RLWarningChannel, ##__VA_ARGS__ )
00120
00136 #define rError(...) \
00137 _rMessage( LOGID, rlog::_RLErrorChannel, ##__VA_ARGS__ )
00138
00156 #define rLog(channel, ...) \
00157 _rMessage( LOGID, channel, ##__VA_ARGS__ )
00158
00159