Index: code/branches/network/src/orxonox/GraphicsEngine.cc
===================================================================
--- code/branches/network/src/orxonox/GraphicsEngine.cc	(revision 939)
+++ code/branches/network/src/orxonox/GraphicsEngine.cc	(revision 940)
@@ -35,4 +35,5 @@
 #include <OgreException.h>
 #include <OgreConfigFile.h>
+#include <OgreLogManager.h>
 #include <OgreTextureManager.h>
 #include <OgreRenderWindow.h>
@@ -69,7 +70,13 @@
   {
     SetConfigValue(dataPath_, dataPath_).description("relative path to media data");
-
-  }
-
+    SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use to \"\" to suppress log file creation.");
+    SetConfigValue(ogreLogLevelTrivial_ , 5).description("relative path to media data");
+    SetConfigValue(ogreLogLevelNormal_  , 4).description("relative path to media data");
+    SetConfigValue(ogreLogLevelCritical_, 2).description("relative path to media data");
+  }
+
+  /**
+    @brief Creates the Ogre Root object and sets up the ogre log.
+  */
   void GraphicsEngine::setup()
   {
@@ -86,4 +93,23 @@
     std::string plugin_filename = "plugins.cfg";
 #endif
+
+    // create a logManager
+    LogManager *logger;
+		if(LogManager::getSingletonPtr() == 0)
+			logger = new LogManager();
+    else
+      logger = LogManager::getSingletonPtr();
+
+    // create our own log that we can listen to
+    Log *myLog;
+    if (this->ogreLogfile_ == "")
+      myLog = logger->createLog("ogre.log", true, false, true);
+    else
+      myLog = logger->createLog(this->ogreLogfile_, true, false, false);
+
+    myLog->setLogDetail(LL_BOREME);
+    myLog->addListener(this);
+
+    // Root will detect that we've already created a Log
     root_ = new Root(plugin_filename);
   }
@@ -196,3 +222,33 @@
   }
 
+  /**
+    @brief Method called by the LogListener interface from Ogre.
+    We use it to capture Ogre log messages and handle it ourselves.
+    @param message The message to be logged
+    @param lml The message level the log is using
+    @param maskDebug If we are printing to the console or not
+    @param logName the name of this log (so you can have several listeners
+                   for different logs, and identify them)
+  */
+  void GraphicsEngine::messageLogged(const std::string& message,
+    LogMessageLevel lml, bool maskDebug, const std::string &logName)
+  {
+    int orxonoxLevel;
+    switch (lml)
+    {
+      case LML_TRIVIAL:
+        orxonoxLevel = this->ogreLogLevelTrivial_;
+        break;
+      case LML_NORMAL:
+        orxonoxLevel = this->ogreLogLevelNormal_;
+        break;
+      case LML_CRITICAL:
+        orxonoxLevel = this->ogreLogLevelCritical_;
+        break;
+      default:
+        orxonoxLevel = 0;
+    }
+    OutputHandler::getOutStream().setOutputLevel(orxonoxLevel)
+        << "*** Ogre: " << message << std::endl;
+  }
 }
Index: code/branches/network/src/orxonox/GraphicsEngine.h
===================================================================
--- code/branches/network/src/orxonox/GraphicsEngine.h	(revision 939)
+++ code/branches/network/src/orxonox/GraphicsEngine.h	(revision 940)
@@ -11,4 +11,5 @@
 
 #include <OgrePrerequisites.h>
+#include <OgreLog.h>
 #include <OgreRoot.h>
 #include <OgreSceneManager.h>
@@ -23,5 +24,5 @@
    * graphics engine manager class
  */
-  class _OrxonoxExport GraphicsEngine : public OrxonoxClass
+  class _OrxonoxExport GraphicsEngine : public OrxonoxClass, public Ogre::LogListener
   {
     public:
@@ -54,4 +55,8 @@
 
     private:
+      //! Method called by the LogListener from Ogre
+      void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
+                         bool maskDebug, const std::string &logName);
+
       Ogre::Root*         root_;        //!< Ogre's root
       std::string         configPath_;  //!< path to config file
@@ -60,4 +65,8 @@
       Ogre::RenderWindow* renderWindow_;//!< the current render window
       //bool               bOverwritePath_; //!< overwrites path
+      std::string         ogreLogfile_; //!< log file name for Ogre log messages
+      int ogreLogLevelTrivial_;         //!< Corresponding Orxonx debug level for LL_TRIVIAL
+      int ogreLogLevelNormal_;          //!< Corresponding Orxonx debug level for LL_NORMAL
+      int ogreLogLevelCritical_;        //!< Corresponding Orxonx debug level for LL_CRITICAL
 
   };
Index: code/branches/network/src/orxonox/InputHandler.cc
===================================================================
--- code/branches/network/src/orxonox/InputHandler.cc	(revision 939)
+++ code/branches/network/src/orxonox/InputHandler.cc	(revision 940)
@@ -107,22 +107,16 @@
         COUT(ORX_DEBUG) << "*** InputHandler: Created OIS input system" << std::endl;
 
-        // If possible create a buffered keyboard
-        if (inputSystem_->numKeyboards() > 0)
-        {
-          keyboard_ = static_cast<OIS::Keyboard*>(inputSystem_->createInputObject(OIS::OISKeyboard, true));
-          keyboard_->setEventCallback(this);
-          COUT(ORX_DEBUG) << "*** InputHandler: Created OIS mouse" << std::endl;
-        }
-
-        // If possible create a buffered mouse
-        if (inputSystem_->numMice() > 0 )
-        {
-          mouse_ = static_cast<OIS::Mouse*>(inputSystem_->createInputObject(OIS::OISMouse, true));
-          mouse_->setEventCallback(this);
-          COUT(ORX_DEBUG) << "*** InputHandler: Created OIS keyboard" << std::endl;
-
-          // Set mouse region
-          this->setWindowExtents(windowWidth, windowHeight);
-        }
+        // create a keyboard. If none are available the exception is caught.
+        keyboard_ = static_cast<OIS::Keyboard*>(inputSystem_->createInputObject(OIS::OISKeyboard, true));
+        keyboard_->setEventCallback(this);
+        COUT(ORX_DEBUG) << "*** InputHandler: Created OIS mouse" << std::endl;
+
+        // create a mouse. If none are available the exception is caught.
+        mouse_ = static_cast<OIS::Mouse*>(inputSystem_->createInputObject(OIS::OISMouse, true));
+        mouse_->setEventCallback(this);
+        COUT(ORX_DEBUG) << "*** InputHandler: Created OIS keyboard" << std::endl;
+
+        // Set mouse region
+        this->setWindowExtents(windowWidth, windowHeight);
       }
       catch (OIS::Exception ex)
