summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Lorenz <jlorenz@de.adit-jv.com>2017-02-15 11:06:26 +0100
committerJens Lorenz <jlorenz@de.adit-jv.com>2017-02-15 11:06:26 +0100
commita0ee2d358a5130c6dd5646f7b44de4514387bc8e (patch)
tree8e7f0a69b32822e6c777313d0a2627d337064f83
parent1cdbdc4dbff91a61503e86e2dfd7abec3d43a968 (diff)
downloadaudiomanager-a0ee2d358a5130c6dd5646f7b44de4514387bc8e.tar.gz
AMUtil: Enhancement of check log level support for DLT.
The DLT version determination works in AudioManager repository. Other libraries including header only don't know the respective version. Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
-rw-r--r--AudioManagerUtilities/CMakeLists.txt10
-rw-r--r--AudioManagerUtilities/include/CAmDltWrapper.h7
2 files changed, 4 insertions, 13 deletions
diff --git a/AudioManagerUtilities/CMakeLists.txt b/AudioManagerUtilities/CMakeLists.txt
index 5933e4b..6e9a06f 100644
--- a/AudioManagerUtilities/CMakeLists.txt
+++ b/AudioManagerUtilities/CMakeLists.txt
@@ -109,16 +109,6 @@ IF (WITH_DLT)
add_definitions(${DLT_CFLAGS_OTHER})
- set (DLT_VERSIONING ${DLT_VERSION})
- string (REPLACE "." ";" DLT_VERSIONING ${DLT_VERSIONING})
- list (LENGTH DLT_VERSIONING size)
-
- if (size GREATER "1")
- list (GET DLT_VERSIONING 0 DLT_MAJOR_VERSION)
- list (GET DLT_VERSIONING 1 DLT_MINOR_VERSION)
- add_definitions (-DDLT_MAJOR_VERSION=${DLT_MAJOR_VERSION} -DDLT_MINOR_VERSION=${DLT_MINOR_VERSION})
- endif (size GREATER "1")
-
set(AUDIO_MANAGER_UTILITIES_LIBS
${AUDIO_MANAGER_UTILITIES_LIBS}
${DLT_LIBRARIES}
diff --git a/AudioManagerUtilities/include/CAmDltWrapper.h b/AudioManagerUtilities/include/CAmDltWrapper.h
index a37ec77..8c5678e 100644
--- a/AudioManagerUtilities/include/CAmDltWrapper.h
+++ b/AudioManagerUtilities/include/CAmDltWrapper.h
@@ -161,10 +161,11 @@ public:
bool checkLogLevel(DltLogLevelType logLevel)
{
#ifdef WITH_DLT
- #if (DLT_MAJOR_VERSION >= 2 && DLT_MINOR_VERSION >= 16)
- return (1 == dlt_user_is_logLevel_enabled(&mDltContext,logLevel)? true: false);
+ #ifdef DLT_IS_LOG_LEVEL_ENABLED
+ return (dlt_user_is_logLevel_enabled(&mDltContext, logLevel) == DLT_RETURN_TRUE);
#else
- return false;
+ (void)logLevel;
+ return true;
#endif
#else
return (logLevel <= mDltContext.log_level_user);