hello:
I am using bios_6_33_06_50 ,CCS5.3. My app is a realtime APP, I want to printf some logs, I am not sure whether use log_info0 or log_print0, witch is better for my realtime sysytem ?
Best Regards
Si
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Si,
Real time diagnostic logging depends on the implementation of Log module.
You can start to study logging from :
http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Logging
If the implementation of Log is LoggerBuf, Log_print0/info0 would be processed in real time.
LoggerBuf is one of real time diagnostic logging implementation.
Best Regards,
Kawada
To add to Kawada's correct comments...here is the generated code for the two APIs (in Log__epilogue.h)
Log_info0
#define xdc_runtime_Log_info0(fmt) \
xdc_runtime_Log_info1(fmt,0)
#define xdc_runtime_Log_info1(fmt, a1) \
((Module__LOGDEF && xdc_runtime_Diags_query(Log_L_info)) ? \
xdc_runtime_Log_doPut4((Log_L_info), Module__MID, (IArg) xdc_FILE__, \
(IArg) __LINE__, (IArg) fmt, (a1)) : (void)0 \
)
Log_print0
#define xdc_runtime_Log_print0(mask, fmt) \
((Module__LOGDEF && xdc_runtime_Diags_query(mask)) ? \
xdc_runtime_Log_doPut1(mask, Module__MID, (IArg) fmt) : (void)0 \
)
Both end calling a Log_doPut call (which ends up calling a logger implementation like LoggerBuf), but the info one adds the filename and line number. So Log_print0 potentially has slightly better performance (depends on the logger implementation though).
Todd