diff options
author | Christoph Lipka <clipka@jp.adit-jv.com> | 2016-05-11 12:13:58 +0900 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2016-09-23 15:37:23 +0200 |
commit | 53cd25f1e37c65d465493df6e7e3ebb0270bd651 (patch) | |
tree | 855fdb70d6996d96defa7491ae454fccdb2effee /src/lib | |
parent | b2326c879612f35e6fcacdf4c9957e942a1d5741 (diff) | |
download | DLT-daemon-53cd25f1e37c65d465493df6e7e3ebb0270bd651.tar.gz |
Add dlt_user_is_logLevel_enabled API
This function allows an application developer to check if the DLT
LogLevel is enabled before starting any log string creation. It can be
used in application specific logging wrapper functions.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Change-Id: I4c269b12bfdeae29a4e795385cdbc54a579ba621
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dlt_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index ef0f36f..ca7a56d 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -1371,7 +1371,7 @@ DltReturnValue dlt_user_log_write_start_id(DltContext *handle, DltContextData *l log->size = 0; /* check log levels */ - if (handle->log_level_ptr != NULL && (loglevel <= (int) *(handle->log_level_ptr)) && (loglevel != DLT_LOG_OFF)) + if (dlt_user_is_logLevel_enabled(handle, loglevel) == DLT_RETURN_TRUE) { /* In non-verbose mode, insert message id */ if (dlt_user.verbose_mode == 0) |