summaryrefslogtreecommitdiff
path: root/implementation/logger/src/message.cpp
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2020-06-29 15:14:50 +0200
committerLutz Bichler <Lutz.Bichler@bmw.de>2020-06-29 15:14:50 +0200
commit3ccf1c682d31e453d356e4b902d8aebce3f376a1 (patch)
tree728e38e268a23f6157753a1a004bf7f66bec081f /implementation/logger/src/message.cpp
parentc78c92307c4908ed286042def6fdae86f9a04b70 (diff)
downloadvSomeIP-3ccf1c682d31e453d356e4b902d8aebce3f376a1.tar.gz
vsomeip 3.1.15.13.1.15.1
Diffstat (limited to 'implementation/logger/src/message.cpp')
-rw-r--r--implementation/logger/src/message.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/implementation/logger/src/message.cpp b/implementation/logger/src/message.cpp
index 363db37..e4a902f 100644
--- a/implementation/logger/src/message.cpp
+++ b/implementation/logger/src/message.cpp
@@ -10,7 +10,11 @@
#include <iostream>
#ifdef ANDROID
-#include <utils/Log.h>
+#include <android/log.h>
+
+#ifndef LOG_TAG
+#define LOG_TAG NULL
+#endif
#endif
#include <vsomeip/internal/logger.hpp>
@@ -90,25 +94,25 @@ message::~message() {
#else
switch (level_) {
case level_e::LL_FATAL:
- ALOGE(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, "%s", buffer_.data_.str().c_str());
break;
case level_e::LL_ERROR:
- ALOGE(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, "%s", buffer_.data_.str().c_str());
break;
case level_e::LL_WARNING:
- ALOGW(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_WARN, LOG_TAG, "%s", buffer_.data_.str().c_str());
break;
case level_e::LL_INFO:
- ALOGI(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, "%s", buffer_.data_.str().c_str());
break;
case level_e::LL_DEBUG:
- ALOGD(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, "%s", buffer_.data_.str().c_str());
break;
case level_e::LL_VERBOSE:
- ALOGV(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "%s", buffer_.data_.str().c_str());
break;
default:
- ALOGI(buffer_.data_.str());
+ (void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, "%s", buffer_.data_.str().c_str());
};
#endif // !ANDROID
}