summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-06-26 19:32:28 +0200
committerchristian mueller <christian.ei.mueller@bmw.de>2012-06-26 19:32:28 +0200
commit278c08ffaff6de6155bffa80cd5a25ac0807b745 (patch)
tree6249182bfad764ea554a17da451cdbcd0915e97d /AudioManagerDaemon/src
parent1bf2a426413476ed790929e3bf15001714fec395 (diff)
downloadaudiomanager-278c08ffaff6de6155bffa80cd5a25ac0807b745.tar.gz
* [GAM-55] some finetuning on bugfix.
* fixing registration of Dltcontextx too late for Dbus plugins Signed-off-by: christian mueller <christian.ei.mueller@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/src')
-rw-r--r--AudioManagerDaemon/src/CAmDltWrapper.cpp11
-rwxr-xr-xAudioManagerDaemon/src/main.cpp2
2 files changed, 9 insertions, 4 deletions
diff --git a/AudioManagerDaemon/src/CAmDltWrapper.cpp b/AudioManagerDaemon/src/CAmDltWrapper.cpp
index aa7e423..51ab7ce 100644
--- a/AudioManagerDaemon/src/CAmDltWrapper.cpp
+++ b/AudioManagerDaemon/src/CAmDltWrapper.cpp
@@ -61,7 +61,7 @@ CAmDltWrapper::CAmDltWrapper(const bool enableNoDLTDebug) :
{
(void) enableNoDLTDebug;
#ifndef WITH_DLT
- std::cout << "[DLT] Running without DLT-support" << std::endl;
+ std::cout << "\e[0;34m[DLT]\e[0;30m\tRunning without DLT-support" << std::endl;
#endif
}
@@ -82,7 +82,7 @@ void CAmDltWrapper::registerContext(DltContext& handle, const char *contextid, c
#ifdef WITH_DLT
dlt_register_context(&handle, contextid, description);
#else
- (void) handle;
+ strncpy(handle.contextID,contextid,4);
// store only the first contextID
if(0 == strlen(mDltContext.contextID))
@@ -96,6 +96,8 @@ void CAmDltWrapper::registerContext(DltContext& handle, const char *contextid, c
}
}
+ std::cout << "\e[0;34m[DLT]\e[0;30m\tRegistering Context " << contextid << " , " << description << std::endl;
+
#endif
}
@@ -107,6 +109,9 @@ void CAmDltWrapper::init(DltLogLevelType loglevel, DltContext* context)
context = &mDltContext;
#ifdef WITH_DLT
dlt_user_log_write_start(context, &mDltContextData, loglevel);
+#else
+ if(mEnableNoDLTDebug)
+ std::cout << "\e[0;34m[" << context->contextID << "]\e[0;30m\t";
#endif
}
@@ -117,7 +122,7 @@ void CAmDltWrapper::send()
dlt_user_log_write_finish(&mDltContextData);
#else
if(mEnableNoDLTDebug)
- std::cout << "[" << mDltContext.contextID << "] " << mDltContextData.buffer.str().c_str() << std::endl;
+ std::cout << mDltContextData.buffer.str().c_str() << std::endl;
mDltContextData.buffer.str("");
mDltContextData.buffer.clear();
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index de2a91a..b9eade1 100755
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -235,7 +235,7 @@ void parseCommandLine(int argc, char **argv)
break;
#ifndef WITH_DLT
case 'V':
- printf("[DLT] debug output to stdout enabled\n");
+ printf("\e[0;34m[DLT]\e[0;30m\tDebug output to stdout enabled\n");
enableNoDLTDebug = true;
break;
#endif