changed logging during startup of layermanagement: some logging items were moved...
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 25 Nov 2011 14:02:06 +0000 (15:02 +0100)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Tue, 29 Nov 2011 13:51:09 +0000 (14:51 +0100)
LayerManagerCommands/src/CommitCommand.cpp
LayerManagerPlugins/Communicators/DBUSCommunicator/CMakeLists.txt
LayerManagerPlugins/Communicators/DBUSCommunicator/src/DBUSCommunicator.cpp
LayerManagerPlugins/Renderers/Graphic/CMakeLists.txt
LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp
LayerManagerService/src/Layermanager.cpp
LayerManagerService/src/main.cpp

index 6232a2e..4bd4a6c 100644 (file)
@@ -36,7 +36,7 @@ ExecutionResult CommitCommand::execute(ICommandExecutor* executor)
         ICommand* command = (*iter);
         if (command)
         {
-            LOG_INFO("CommitCommand", "executing command: " << command->getString());
+            LOG_INFO("CommitCommand", "executing " << command->getString());
             ExecutionResult result = command->execute(executor);
 
             if (result == ExecutionFailed || result == ExecutionFailedRedraw)
index ae4101c..23f5550 100644 (file)
@@ -48,7 +48,9 @@ install (TARGETS DBUSCommunicator LIBRARY DESTINATION lib/layermanager/communica
 install (FILES include/LayerManagerService.conf DESTINATION /etc/dbus-1/system.d)
 install (FILES include/LayerManagerService.conf DESTINATION /etc/dbus-1/session.d)
 
-if (WITH_TESTS)
-enable_testing()
-add_subdirectory (test)
-endif(WITH_TESTS)
+
+#if (WITH_TESTS)
+#enable_testing()
+#add_subdirectory (test)
+#endif(WITH_TESTS)
+
index 0a00325..216981a 100644 (file)
@@ -140,11 +140,11 @@ void DBUSCommunicator::setdebug(bool onoff)
 
 bool DBUSCommunicator::start()
 {
-    LOG_INFO("DBUSCommunicator", "Starting up dbus connector");
+       LOG_DEBUG("DBUSCommunicator", "Starting up dbus connector");
 
     g_pDbusMessage = new DBUSMessageHandler();
 
-    LOG_INFO("DBUSCommunicator","registering for dbus path " << DBUS_SERVICE_OBJECT_PATH);
+    LOG_DEBUG("DBUSCommunicator","registering for dbus path " << DBUS_SERVICE_OBJECT_PATH);
     bool registered = g_pDbusMessage->registerPathFunction(DBUSCommunicator::processMessageFunc,
                                                               DBUSCommunicator::unregisterMessageFunc,
                                                               this);
@@ -1878,7 +1878,7 @@ void DBUSCommunicator::SetUniforms(DBusConnection* conn, DBusMessage* msg)
 DBusHandlerResult DBUSCommunicator::delegateMessage(DBusConnection* conn, DBusMessage* msg) 
 {
     DBusHandlerResult result = DBUS_HANDLER_RESULT_HANDLED;
-    LOG_INFO("DBUSCommunicator","message received");
+    LOG_DEBUG("DBUSCommunicator","message received");
     const char *n = dbus_message_get_member(msg);
     bool found = false;
     int i = 0;
@@ -1888,9 +1888,9 @@ DBusHandlerResult DBUSCommunicator::delegateMessage(DBusConnection* conn, DBusMe
         if (n && strcmp(manager_methods[i].name, n) == 0)
         {
             MethodTable entry = manager_methods[i];
-            LOG_INFO("DBUSCommunicator","got call for method:" << entry.name);
+            LOG_DEBUG("DBUSCommunicator","got call for method:" << entry.name);
             CallBackMethod m = entry.function;
-            LOG_INFO("DBUSCommunicator","enter method");
+            LOG_DEBUG("DBUSCommunicator","enter method");
             (this->*m)(conn, msg);
             found = true;
         }
@@ -1899,7 +1899,7 @@ DBusHandlerResult DBUSCommunicator::delegateMessage(DBusConnection* conn, DBusMe
 
     if (dbus_message_is_method_call(msg, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
     {
-        LOG_INFO("DBUSCommunicator", "Introspection called");
+       LOG_DEBUG("DBUSCommunicator", "Introspection called");
         DBUSIntrospection introspectionString(manager_methods);
         introspectionString.process(conn, msg);
         g_pDbusMessage->setConnection(conn);
index 4d6b998..2338dd6 100644 (file)
@@ -115,10 +115,10 @@ file(GLOB GRAPHIC_TRANSFORM_INCLUDES
 
 endif(WITH_GLX_LIB)
 
-if (WITH_TESTS)
-    enable_testing()
-    add_subdirectory (tests)
-endif(WITH_TESTS)
+#if (WITH_TESTS)
+#    enable_testing()
+#    add_subdirectory (tests)
+#endif(WITH_TESTS)
 
 add_library(${GRAPHIC_LIB_NAME} SHARED ${SOURCES})
 
index 689b1fd..1c3fcbc 100644 (file)
@@ -161,7 +161,7 @@ void X11WindowSystem::printDebug(){
             debugmessage << "                        " << std::setw(4) << (*surfaceIter)->getID() << " " << std::setprecision(3) << (*surfaceIter)->opacity<< " " << std::setw(3) << src.x << " " << std::setw(3) << src.y << " " << std::setw(3) << src.width << " " << std::setw(3) << src.height << " " << std::setw(3) << dest.x << " " << std::setw(3) << dest.y << " " << std::setw(3) << dest.width << " " << std::setw(3) << dest.height  << "\n";
         }
     }
-    LOG_INFO("X11WindowSystem",debugmessage.str());
+    LOG_DEBUG("X11WindowSystem",debugmessage.str());
 }
 
 Window * getListOfAllTopLevelWindows (Display *disp, unsigned int *len)
@@ -849,7 +849,7 @@ init_complete:
 #endif
        }
        this->cleanup();
-       LOG_INFO("X11WindowSystem", "Renderer thread finished");
+       LOG_DEBUG("X11WindowSystem", "Renderer thread finished");
        return NULL;
 }
 
@@ -911,7 +911,7 @@ void X11WindowSystem::signalRedrawEvent()
 }
 
 void X11WindowSystem::cleanup(){
-    LOG_INFO("X11WindowSystem", "Cleanup");
+    LOG_DEBUG("X11WindowSystem", "Cleanup");
     if (None != CompositorWindow)
     {
         Window root = RootWindow(x11Display, 0);
@@ -950,7 +950,7 @@ bool X11WindowSystem::init(BaseGraphicSystem<Display*,Window>* base)
     while (!m_initialized)
     {
         usleep(10000); // TODO
-        LOG_INFO("X11WindowSystem","Waiting start complete " << m_initialized);
+        LOG_DEBUG("X11WindowSystem","Waiting start complete " << m_initialized);
     }
     LOG_INFO("X11WindowSystem","Start complete " << m_initialized << " success " << m_success);
     return m_success;
@@ -959,7 +959,7 @@ bool X11WindowSystem::init(BaseGraphicSystem<Display*,Window>* base)
 bool X11WindowSystem::start()
 {
     bool result = true;
-    LOG_INFO("X11WindowSystem", "Starting / Creating thread");
+    LOG_DEBUG("X11WindowSystem", "Starting / Creating thread");
     // let thread actually run
     if ( m_xerror == false )
     {
index f7d7ae5..07b1feb 100644 (file)
@@ -205,7 +205,7 @@ void Layermanager::printDebugInformation() const
 bool Layermanager::executeCommand(ICommand* commandToBeExecuted)
 {
     ExecutionResult status = ExecutionFailed;
-    LOG_INFO("Layermanager", "executing command: " << commandToBeExecuted->getString());
+    LOG_INFO("Layermanager", "executing " << commandToBeExecuted->getString());
     m_pScene->lockScene();
     status = commandToBeExecuted->execute(this);
     m_pScene->unlockScene();
@@ -222,7 +222,7 @@ bool Layermanager::executeCommand(ICommand* commandToBeExecuted)
 
 bool Layermanager::enqueueCommand(ICommand* commandToBeExecuted)
 {
-    LOG_INFO("Layermanager", "add command to queue: " << commandToBeExecuted->getString());
+    LOG_DEBUG("Layermanager", "add command to queue: " << commandToBeExecuted->getString());
     m_pScene->lockScene();
     m_pScene->m_toBeCommittedList.push_back(commandToBeExecuted);
     m_pScene->unlockScene();
@@ -302,7 +302,7 @@ bool Layermanager::delegateScene()
     }
     if (!allStarted)
     {
-        LOG_WARNING("LayerManager","Could not start delegate Scenes, inital Scene is lost");
+        LOG_WARNING("LayerManager","Could not start delegate Scenes, initial Scene is lost");
     }
     return allStarted;
 }
index 76c345f..cd0293e 100644 (file)
@@ -55,12 +55,10 @@ const char* gCommunicatorPluginDirectories[] = { "/communicator" };
 
 uint gCommunicatorPluginDirectoriesCount = sizeof(gCommunicatorPluginDirectories) / sizeof(gCommunicatorPluginDirectories[0]);
                                                  
-const char* gScenePluginDirectories[] = { "/" };
+const char* gScenePluginDirectories[] = { "" };
 
 uint gScenePluginDirectoriesCount = sizeof(gScenePluginDirectories) / sizeof(gScenePluginDirectories[0]);                                                 
                                                  
-
-
 const char* USAGE_DESCRIPTION = "Usage:\t LayerManagerService [options]\n"
                                 "options:\t\n\n"
                                 "\t-w: Window Width\t\n"
@@ -71,7 +69,6 @@ const char* USAGE_DESCRIPTION = "Usage:\t LayerManagerService [options]\n"
                                 "\t-v: show version info\t\n"
                                 "\nexample: LayerManagerService -w800 -h480 -d:0\n";
 
-
 template<class T>
 T* getCreateFunction(string libname)
 {
@@ -184,12 +181,12 @@ void getSharedLibrariesFromDirectory(tFileList& fileList, string dirName)
 
         if (regularFile && sharedLibExtension)
         {
-            LOG_INFO("LayerManagerService", "adding file " << entryName);
+            LOG_DEBUG("LayerManagerService", "adding file " << entryName);
             fileList.push_back(dirName + "/" + entryName);
         }
         else
         {
-            LOG_INFO("LayerManagerService", "ignoring file " << entryName);
+            LOG_DEBUG("LayerManagerService", "ignoring file " << entryName);
         }
     }
 
@@ -210,7 +207,7 @@ void loadScenePlugins(SceneProviderList& sceneProviderList, ICommandExecutor* ex
         getSharedLibrariesFromDirectory(sharedLibraryNameList, directoryName);
     }
 
-    LOG_INFO("LayerManagerService", sharedLibraryNameList.size() << " SceneProvider plugins found");
+    LOG_DEBUG("LayerManagerService", sharedLibraryNameList.size() << " SceneProvider plugins found");
 
     // iterate all communicator plugins and start them
     tFileListIterator iter = sharedLibraryNameList.begin();
@@ -218,7 +215,7 @@ void loadScenePlugins(SceneProviderList& sceneProviderList, ICommandExecutor* ex
 
     for (; iter != iterEnd; ++iter)
     {
-        LOG_DEBUG("LayerManagerService", "Loading SceneProvider library " << *iter);
+        LOG_INFO("LayerManagerService", "Loading SceneProvider plugin " << *iter);
 
         ISceneProvider* (*createFunc)(ICommandExecutor*);
         createFunc = getCreateFunction<ISceneProvider*(ICommandExecutor*)>(*iter);
@@ -257,7 +254,7 @@ void loadCommunicatorPlugins(CommunicatorList& communicatorList, ICommandExecuto
         getSharedLibrariesFromDirectory(sharedLibraryNameList, directoryName);
     }
 
-    LOG_INFO("LayerManagerService", sharedLibraryNameList.size() << " Communicator plugins found");
+    LOG_DEBUG("LayerManagerService", sharedLibraryNameList.size() << " Communicator plugins found");
 
     // iterate all communicator plugins and start them
     tFileListIterator iter = sharedLibraryNameList.begin();
@@ -265,7 +262,7 @@ void loadCommunicatorPlugins(CommunicatorList& communicatorList, ICommandExecuto
 
     for (; iter != iterEnd; ++iter)
     {
-        LOG_DEBUG("LayerManagerService", "Loading Communicator library " << *iter);
+        LOG_INFO("LayerManagerService", "Loading Communicator plugin " << *iter);
 
         ICommunicator* (*createFunc)(ICommandExecutor*);
         createFunc = getCreateFunction<ICommunicator*(ICommandExecutor*)>(*iter);
@@ -303,7 +300,7 @@ void loadRendererPlugins(RendererList& rendererList, IScene* pScene)
         getSharedLibrariesFromDirectory(sharedLibraryNameList, directoryName);
     }
 
-    LOG_INFO("LayerManagerService", sharedLibraryNameList.size() << " Renderer plugins found");
+    LOG_DEBUG("LayerManagerService", sharedLibraryNameList.size() << " Renderer plugins found");
 
     // currently the use of only one renderer is enforced
     if (sharedLibraryNameList.size() > 1)
@@ -321,7 +318,7 @@ void loadRendererPlugins(RendererList& rendererList, IScene* pScene)
 
     for (; iter != iterEnd; ++iter)
     {
-        LOG_DEBUG("LayerManagerService", "Loading Renderer library " << *iter);
+        LOG_INFO("LayerManagerService", "Loading Renderer plugin " << *iter);
         IRenderer* (*createFunc)(IScene*);
         createFunc = getCreateFunction<IRenderer*(IScene*)>(*iter);
         if (!createFunc)
@@ -352,19 +349,19 @@ int main(int argc, char **argv)
     {
         gPluginLookupPath = pluginLookupPath;
     }
-    LOG_INFO("LayerManagerService", "Used plugin Directory is " << gPluginLookupPath);
+    LOG_INFO("LayerManagerService", "Used plugin directory is " << gPluginLookupPath);
 
-    LOG_INFO("LayerManagerService", "Creating Layermanager.");
+    LOG_DEBUG("LayerManagerService", "Creating Layermanager.");
     ICommandExecutor* pManager = new Layermanager();
     IScene* pScene = pManager->getScene();
 
     // Create and load Renderer plugins
-    LOG_INFO("LayerManagerService", "Loading renderer plugins.");
+    LOG_DEBUG("LayerManagerService", "Loading renderer plugins.");
     RendererList rendererList;
     loadRendererPlugins(rendererList, pScene);
 
     // register renderer plugins at layermanager
-    LOG_INFO("LayerManagerService", "Adding " << rendererList.size() << " Renderer plugins to Layermanager.");
+    LOG_DEBUG("LayerManagerService", "Using " << rendererList.size() << " Renderer plugins");
     RendererListIterator rendererIter = rendererList.begin();
     RendererListIterator rendererIterEnd = rendererList.end();
     for (; rendererIter != rendererIterEnd; ++rendererIter)
@@ -373,24 +370,24 @@ int main(int argc, char **argv)
     }
 
     // Create and load communicator plugins
-    LOG_INFO("LayerManagerService", "Loading communicator plugins.");
+    LOG_DEBUG("LayerManagerService", "Loading communicator plugins.");
     CommunicatorList communicatorList;
     loadCommunicatorPlugins(communicatorList, pManager);
 
     // register communicator plugins at layermanager
-    LOG_INFO("LayerManagerService", "Adding " << communicatorList.size() << " Communicator plugin(s) to Layermanager.");
+    LOG_DEBUG("LayerManagerService", "Using " << communicatorList.size() << " Communicator plugins");
     CommunicatorListIterator commIter = communicatorList.begin();
     CommunicatorListIterator commIterEnd = communicatorList.end();
     for (; commIter != commIterEnd; ++commIter)
     {
         pManager->addCommunicator(*commIter);
     }
-    LOG_INFO("LayerManagerService", "Loading scene provider plugins.");
+    LOG_DEBUG("LayerManagerService", "Loading scene provider plugins.");
     SceneProviderList sceneProviderList;
     loadScenePlugins(sceneProviderList, pManager);
 
     // register communicator plugins at layermanager
-    LOG_INFO("LayerManagerService", "Adding " << sceneProviderList.size() << " SceneProvider plugin(s) to Layermanager.");
+    LOG_DEBUG("LayerManagerService", "Using " << sceneProviderList.size() << " SceneProvider plugins");
     SceneProviderListIterator sceneProviderIter = sceneProviderList.begin();
     SceneProviderListIterator sceneProviderIterEnd = sceneProviderList.end();
     for (; sceneProviderIter != sceneProviderIterEnd; ++sceneProviderIter)