summaryrefslogtreecommitdiff
path: root/include/dlt/dlt_user_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dlt/dlt_user_macros.h')
-rw-r--r--include/dlt/dlt_user_macros.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/include/dlt/dlt_user_macros.h b/include/dlt/dlt_user_macros.h
index d50b335..e1b1267 100644
--- a/include/dlt/dlt_user_macros.h
+++ b/include/dlt/dlt_user_macros.h
@@ -187,16 +187,13 @@
#else
#define DLT_LOG(CONTEXT,LOGLEVEL,ARGS...) \
do { \
- if(dlt_user_is_logLevel_enabled(&CONTEXT,LOGLEVEL)==DLT_RETURN_TRUE) \
+ DltContextData log_local; \
+ int dlt_local; \
+ dlt_local = dlt_user_log_write_start(&CONTEXT,&log_local,LOGLEVEL); \
+ if (dlt_local == DLT_RETURN_TRUE) \
{ \
- DltContextData log_local; \
- int dlt_local; \
- dlt_local = dlt_user_log_write_start(&CONTEXT,&log_local,LOGLEVEL); \
- if (dlt_local > 0) \
- { \
- ARGS; \
- (void)dlt_user_log_write_finish(&log_local); \
- } \
+ ARGS; \
+ (void)dlt_user_log_write_finish(&log_local); \
} \
} while(0)
#endif
@@ -219,16 +216,13 @@
#else
#define DLT_LOG_ID(CONTEXT,LOGLEVEL,MSGID,ARGS...) \
do { \
- if(dlt_user_is_logLevel_enabled(&CONTEXT,LOGLEVEL)==DLT_RETURN_TRUE) \
+ DltContextData log_local; \
+ int dlt_local; \
+ dlt_local = dlt_user_log_write_start_id(&CONTEXT,&log_local,LOGLEVEL,MSGID); \
+ if (dlt_local == DLT_RETURN_TRUE) \
{ \
- DltContextData log_local; \
- int dlt_local; \
- dlt_local = dlt_user_log_write_start_id(&CONTEXT,&log_local,LOGLEVEL,MSGID); \
- if (dlt_local > 0) \
- { \
- ARGS; \
- (void)dlt_user_log_write_finish(&log_local); \
- } \
+ ARGS; \
+ (void)dlt_user_log_write_finish(&log_local); \
} \
} while(0)
#endif