diff options
author | Dirk Huss <dirk_huss@mentor.com> | 2016-02-08 18:31:09 +0100 |
---|---|---|
committer | Dirk Huss <dirk_huss@mentor.com> | 2016-02-08 18:31:09 +0100 |
commit | 274ad1873235b333e1872ac98e7b382553fc7c8f (patch) | |
tree | 0d534911871506fc2714bb71eb3627dd4e2b27b4 /src | |
parent | 77d9cdaf6acee03a1e360e0e1a3cd0b01a95b407 (diff) | |
download | genivi-common-api-runtime-274ad1873235b333e1872ac98e7b382553fc7c8f.tar.gz |
CommonAPI 3.1.6
Diffstat (limited to 'src')
-rw-r--r-- | src/CommonAPI/Logger.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/CommonAPI/Logger.cpp b/src/CommonAPI/Logger.cpp index 9527431..81b93f2 100644 --- a/src/CommonAPI/Logger.cpp +++ b/src/CommonAPI/Logger.cpp @@ -32,17 +32,23 @@ Logger::Level Logger::maximumLogLevel_(Logger::Level::LL_INFO); Logger::Logger() { #ifdef USE_DLT - DLT_REGISTER_APP("CAPI", "CAPI"); - std::string context = Runtime::getProperty("LogContext"); - if (context == "") context = "CAPI"; - DLT_REGISTER_CONTEXT(dlt_, context.c_str(), "CAPI"); + if (useDlt_) { + std::string app = Runtime::getProperty("LogApplication"); + if (app == "") app = "CAPI"; + DLT_REGISTER_APP(app.c_str(), "CAPI"); + std::string context = Runtime::getProperty("LogContext"); + if (context == "") context = "CAPI"; + DLT_REGISTER_CONTEXT(dlt_, context.c_str(), "CAPI"); + } #endif } Logger::~Logger() { #ifdef USE_DLT - DLT_UNREGISTER_CONTEXT(dlt_); - DLT_UNREGISTER_APP(); + if (useDlt_) { + DLT_UNREGISTER_CONTEXT(dlt_); + DLT_UNREGISTER_APP(); + } #endif } |