#include <iostream>
#include <string.h>
+#ifdef COLORIZE_LOGS
+# define SOURCE "\e[0;34m"
+# define NORMAL "\e[0;30m"
+#else
+# define SOURCE ""
+# define NORMAL ""
+#endif
+
namespace am
{
{
(void) enableNoDLTDebug;
#ifndef WITH_DLT
- std::cout << "\e[0;34m[DLT]\e[0;30m\tRunning without DLT-support" << std::endl;
+ std::cout << SOURCE "[DLT]" NORMAL "\tRunning without DLT-support" << std::endl;
#endif
}
}
}
- std::cout << "\e[0;34m[DLT]\e[0;30m\tRegistering Context " << contextid << " , " << description << std::endl;
+ std::cout << SOURCE "[DLT]" NORMAL "\tRegistering Context " << contextid << " , " << description << std::endl;
#endif
}
dlt_user_log_write_start(context, &mDltContextData, loglevel);
#else
if(mEnableNoDLTDebug)
- std::cout << "\e[0;34m[" << context->contextID << "]\e[0;30m\t";
+ std::cout << SOURCE "[" << context->contextID << "]" NORMAL "\t";
#endif
}
#include "shared/CAmDltWrapper.h"
#include "shared/CAmSocketHandler.h"
+#ifdef COLORIZE_LOGS
+# define SOURCE "\e[0;34m"
+# define NORMAL "\e[0;30m"
+#else
+# define SOURCE ""
+# define NORMAL ""
+#endif
using namespace am;
DLT_DECLARE_CONTEXT(AudioManager)
{
#ifdef WITH_DLT
#ifdef WITH_DBUS_WRAPPER
- int option = getopt(argc, argv, "h::v::c::l::r::L::R::d::t::m::i::p::T::");
+ int option = getopt(argc, argv, "hvc:l:r:L:R:d:t:m:ip:T:");
#else
- int option = getopt(argc, argv, "h::v::c::l::r::L::R::d::t::m::i::p::");
+ int option = getopt(argc, argv, "hvc:l:r:L:R:d:t:m:ip:");
#endif //WITH_DBUS_WRAPPER
#else
#ifdef WITH_DBUS_WRAPPER
- int option = getopt(argc, argv, "h::v::V::c::l::r::L::R::d::t::m::i::p::T::");
+ int option = getopt(argc, argv, "hvVc:l:r:L:R:d:t:m:ip:T:");
#else
- int option = getopt(argc, argv, "h::v::V::c::l::r::L::R::d::t::m::i::p::");
+ int option = getopt(argc, argv, "hvVc:l:r:L:R:d:t:m:ip:");
#endif //WITH_DBUS_WRAPPER
#endif
break;
#ifndef WITH_DLT
case 'V':
- printf("\e[0;34m[DLT]\e[0;30m\tDebug output to stdout enabled\n");
+ printf(SOURCE "[DLT]" NORMAL "\tDebug output to stdout enabled\n");
enableNoDLTDebug = true;
break;
#endif
OPTION ( WITH_DATABASE_STORAGE
"build with sqlite as in memory storage" OFF)
+OPTION ( COLORIZE_LOGS
+ "colorize logs if we log to stdout" OFF)
+
+IF (COLORIZE_LOGS)
+ SET (COLORIZE_FLAGS -DCOLORIZE_LOGS)
+ENDIF (COLORIZE_LOGS)
+
SET (WITH_COMMON_API_GEN ON CACHE INTERNAL "hide this!" FORCE)
IF (WITH_ENABLED_IPC STREQUAL "DBUS")
ENDIF(WITH_DOCUMENTATION)
##global build flags set(CPACK_RPM_COMPONENT_INSTALL ON)
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=gnu++0x -D_GNU_SOURCE -pedantic -Wno-variadic-macros -Wno-long-long")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=gnu++0x -D_GNU_SOURCE -pedantic -Wno-variadic-macros -Wno-long-long ${COLORIZE_FLAGS}")
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -std=c++98 -D_GNU_SOURCE")
set (CMAKE_DL_LIBS "${CMAKE_DL_LIBS} -lrt")
if(WITH_PLUGIN_CONTROL)
add_subdirectory (PluginControlInterface)
add_subdirectory (PluginControlInterfaceDbus)
+ add_subdirectory (PluginControlInterfaceMurphy)
endif(WITH_PLUGIN_CONTROL)
add_subdirectory (AudioManagerDaemon)