diff options
author | Dirk Huss <dirk_huss@mentor.com> | 2016-04-08 10:41:00 +0200 |
---|---|---|
committer | Dirk Huss <dirk_huss@mentor.com> | 2016-04-08 10:41:00 +0200 |
commit | 1c158272e2ee4b93021a97ac3b5c207a137b0d2c (patch) | |
tree | b27d937fad635fde5a43f40300b4737e6ad30f98 /src/CommonAPI | |
parent | 9345fac016a33c61175e4a06675c20d8590dc201 (diff) | |
download | genivi-common-api-runtime-1c158272e2ee4b93021a97ac3b5c207a137b0d2c.tar.gz |
CommonAPI 3.1.7.1
Diffstat (limited to 'src/CommonAPI')
-rw-r--r-- | src/CommonAPI/IniFileReader.cpp | 2 | ||||
-rw-r--r-- | src/CommonAPI/Logger.cpp | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/CommonAPI/IniFileReader.cpp b/src/CommonAPI/IniFileReader.cpp index b1c96f1..fd8adf8 100644 --- a/src/CommonAPI/IniFileReader.cpp +++ b/src/CommonAPI/IniFileReader.cpp @@ -30,7 +30,7 @@ bool IniFileReader::load(const std::string &_path) { std::ifstream configStream(_path); if (configStream.is_open()) { - COMMONAPI_INFO("Loading ini file from ", _path); + //COMMONAPI_INFO("Loading ini file from ", _path); int lineCounter(0); std::string currentSectionName; diff --git a/src/CommonAPI/Logger.cpp b/src/CommonAPI/Logger.cpp index 81b93f2..0de6c9a 100644 --- a/src/CommonAPI/Logger.cpp +++ b/src/CommonAPI/Logger.cpp @@ -33,12 +33,15 @@ Logger::Level Logger::maximumLogLevel_(Logger::Level::LL_INFO); Logger::Logger() { #ifdef USE_DLT 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"); + if (DLT_RETURN_ERROR == dlt_register_context(&dlt_, context.c_str(), "CAPI")) { + std::string app = Runtime::getProperty("LogApplication"); + if (app == "") app = "CAPI"; + ownAppID_ = true; + DLT_REGISTER_APP(app.c_str(), "CAPI"); + DLT_REGISTER_CONTEXT(dlt_, context.c_str(), "CAPI"); + } } #endif } @@ -47,7 +50,9 @@ Logger::~Logger() { #ifdef USE_DLT if (useDlt_) { DLT_UNREGISTER_CONTEXT(dlt_); - DLT_UNREGISTER_APP(); + if (ownAppID_) { + DLT_UNREGISTER_APP(); + } } #endif } |