// This API needs to be called after configuring all the required parameters
// by using below APIs. This API initializes logging framework.
// Log MACRO's should be used only after calling this API.
-void rlInitLog(U8 type);
+void rlInitLog(uint8_t type);
///////////////////////////////////////////////////////////////////////////////
// This initializes log file name. Log file name should be exclusive of
// This API is used to set remote logging port, where post-processor application
// (rlogapp) is used to connect on this port in order to receive live binary logs.
// This API can be used only during initialization time.
-void rlSetLogPort(U32 port);
+void rlSetLogPort(uint32_t port);
///////////////////////////////////////////////////////////////////////////////
// Use this API to set log level. This API supports run time modification of
// This API toggles the module mask. If logging for this module is already
// enabled, it will be disabled. If it's not enabled, it will enable. Zero
// input will disable logging mask for all modules.
-void rlSetModuleMask(U32 modMask);
+void rlSetModuleMask(uint32_t modMask);
///////////////////////////////////////////////////////////////////////////////
// This API is used to set log file size limit for single file.
-void rlSetLogFileSizeLimit(U32 maxFileSize);
+void rlSetLogFileSizeLimit(uint32_t maxFileSize);
///////////////////////////////////////////////////////////////////////////////
// This API sets the limit of number of log files that can be created by
// logging framework.
-void rlSetNumOfLogFiles(U8 nMaxFiles);
+void rlSetNumOfLogFiles(uint8_t nMaxFiles);
///////////////////////////////////////////////////////////////////////////////
// This API is used to set circular buffer size for each thread. Based on the
// number of threads in the system this size needs to be chosen. Recommended
// minimum 100Kb buffer size.
-void rlSetCircularBufferSize(U32 bufSize);
+void rlSetCircularBufferSize(uint32_t bufSize);
///////////////////////////////////////////////////////////////////////////////
// This API enables or disables remote logging application connection to see
///////////////////////////////////////////////////////////////////////////////
// This API updates the RLOG Tti count baed on this time stamp will be updated
-extern void rlUpdateRlogTti(void);
+void rlUpdateRlogTti(void);
///////////////////////////////////////////////////////////////////////////////
// This API reset the RLOG rate control count and enable logging every 10 ms
-extern void rlResetLogRateLmt(void);
+void rlResetLogRateLmt(void);
///////////////////////////////////////////////////////////////////////////////
// This API reset the RLOG rate control count and enable logging every 10 ms
-extern void rlResetLogRateLmt(void);
+void rlResetLogRateLmt(void);
///////////////////////////////////////////////////////////////////////////////
// This API Start the limit the number of logs loggd into circular buffer every
// 10ms
-extern void rlStartLogCountLimit(void);
+void rlStartLogCountLimit(void);
///////////////////////////////////////////////////////////////////////////////
// This API stops restriciton of limiting number of logs every 10 ms
-extern void rlStopLogCountLimit(void);
+void rlStopLogCountLimit(void);
#ifdef WR_DBG_CIRLOG
#else
+#if defined(RLOG_ENABLE_TEXT_LOGGING)
+
#define FMTSTR "[%d-%d-%d %d:%d:%d.%03d][%s]%s:%d\n%s:"
#define FMTSTR_S "[%d-%d-%d %d:%d:%d.%03d][%s]%s:%d\n%s:%s:%ld:"
#define RLOG3(_level, _lstr, _arg1, _arg2, _arg3) LOG_ARGN(3, _level, _lstr, _arg1, _arg2, _arg3)
#define RLOG4(_level, _lstr, _arg1, _arg2, _arg3, _arg4)LOG_ARGN(4, _level, _lstr, _arg1, _arg2, _arg3, _arg4)
+#else /* BINARY LOGGING */
+
+#define LOG_ARG0(_level, _fmtStr) \
+if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\
+{ \
+ logLev0(_LOGID, _level, __FILE__,__LINE__, _fmtStr, RLOG_FILE_ID, RLOG_MODULE_NAME); \
+}
+
+#define LOG_ARGN(_N, _level, _fmtStr, ...) \
+if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\
+{ \
+ logLev##_N(_LOGID, _level, ##__VA_ARGS__, __FILE__,__LINE__, _fmtStr, RLOG_FILE_ID, RLOG_MODULE_NAME); \
+}
+
+#define LOG_SPL(_level, _splenum, _splArg, _fmtStr, ...) \
+if( _level < g_logLevel || g_modMask & RLOG_MODULE_ID)\
+{ \
+ logLevE(_LOGID,_level,_splenum, _splArg, ##__VA_ARGS__, __FILE__,__LINE__, _fmtStr, RLOG_FILE_ID, RLOG_MODULE_NAME); \
+}
+
+#define RLOG0(_level, _lstr) LOG_ARG0(_level, _lstr)
+#define RLOG1(_level, _lstr, _arg1) LOG_ARGN(1, _level, _lstr, _arg1)
+#define RLOG2(_level, _lstr, _arg1, _arg2) LOG_ARGN(2, _level, _lstr, _arg1, _arg2)
+#define RLOG3(_level, _lstr, _arg1, _arg2, _arg3) LOG_ARGN(3, _level, _lstr, _arg1, _arg2, _arg3)
+#define RLOG4(_level, _lstr, _arg1, _arg2, _arg3, _arg4)LOG_ARGN(4, _level, _lstr, _arg1, _arg2, _arg3, _arg4)
+
+#endif /* if defined(RLOG_ENABLE_TEXT_LOGGING) */
#define RLOG_STR(_level, _lstr, _strarg) LOG_ARGN(S, _level, _lstr, _strarg)
#define RLOG_HEX(_level, _lstr, _hexdata, _hexlen) LOG_ARGN(H, _level, _lstr, _hexdata, _hexlen)