Define ANJ_LOG_MICRO

Define Documentation

ANJ_LOG_MICRO

Enable logger in micro mode. The header for log messages contains:

  • level of log message

  • numeric id of source file the log is called from

  • line number of the log call

To use micro logs in your application you need to define ANJ_SOURCE_FILE_ID macro in each source file before including anj/log.h. The value of this macro should be a unique integer for each source file in your application.

// In your source file
#define ANJ_SOURCE_FILE_ID 201
#include <anj/log.h>

Note

Anjay Lite source code already defines ANJ_SOURCE_FILE_ID in each source file reserving the range from 0 to 200. User application should use values starting from 201.

Note

Micro logs reduce RAM and ROM usage compared to full logs with the cost of reduced log message readability. To decode micro logs you can use the tools/micro_logs_decode.py script shipped with Anjay Lite.