Index: /code/branches/output/src/libraries/core/Core.cc
===================================================================
--- /code/branches/output/src/libraries/core/Core.cc	(revision 8798)
+++ /code/branches/output/src/libraries/core/Core.cc	(revision 8799)
@@ -50,6 +50,4 @@
 #  undef max
 #endif
-
-#include <boost/preprocessor/stringize.hpp>
 
 #include "util/Clock.h"
@@ -231,20 +229,25 @@
     }
 
-    namespace DefaultLevelLogFile
-    {
-#pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: inspect this (and remove boost include)")
-        const OutputLevel Dev  = level::internal_info;
-        const OutputLevel User = level::internal_info;
-    }
-
     //! Function to collect the SetConfigValue-macro calls.
     void Core::setConfigValues()
     {
-        // Choose the default level according to the path Orxonox was started (build directory or not)
-        OutputLevel defaultLogLevel = (PathConfig::buildDirectoryRun() ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
-
-        SetConfigValueExternal(debugLevelLogFile_, "OutputHandler", "debugLevelLogFile", defaultLogLevel)
-            .description("The maximum level of debug output written to the log file");
-        LogWriter::getInstance().setLevelMax(this->debugLevelLogFile_);
+        SetConfigValueExternal(LogWriter::getInstance().configurableMaxLevel_,
+                               LogWriter::getInstance().getConfigurableSectionName(),
+                               LogWriter::getInstance().getConfigurableMaxLevelName(),
+                               LogWriter::getInstance().configurableMaxLevel_)
+            .description("The maximum level of output shown in the log file")
+            .callback(static_cast<BaseWriter*>(&LogWriter::getInstance()), &BaseWriter::changedConfigurableLevels);
+        SetConfigValueExternal(LogWriter::getInstance().configurableContextsMaxLevel_,
+                               LogWriter::getInstance().getConfigurableSectionName(),
+                               LogWriter::getInstance().getConfigurableContextsMaxLevelName(),
+                               LogWriter::getInstance().configurableContextsMaxLevel_)
+            .description("The maximum level of output shown in the log file for additional contexts")
+            .callback(static_cast<BaseWriter*>(&LogWriter::getInstance()), &BaseWriter::changedConfigurableLevels);
+        SetConfigValueExternal(LogWriter::getInstance().configurableContexts_,
+                               LogWriter::getInstance().getConfigurableSectionName(),
+                               LogWriter::getInstance().getConfigurableContextsName(),
+                               LogWriter::getInstance().configurableContexts_)
+            .description("Additional output contexts shown in the log file")
+            .callback(static_cast<BaseWriter*>(&LogWriter::getInstance()), &BaseWriter::changedConfigurableContexts);
 
         SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun())
@@ -281,15 +284,4 @@
     void Core::devModeChanged()
     {
-        bool isNormal = (bDevMode_ == PathConfig::buildDirectoryRun());
-        if (isNormal)
-        {
-            ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", update);
-        }
-        else
-        {
-            OutputLevel level = (bDevMode_ ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
-            ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", tset, level);
-        }
-
         // Inform listeners
         ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin();
Index: /code/branches/output/src/libraries/core/Core.h
===================================================================
--- /code/branches/output/src/libraries/core/Core.h	(revision 8798)
+++ /code/branches/output/src/libraries/core/Core.h	(revision 8799)
@@ -136,5 +136,4 @@
 
             bool                      bGraphicsLoaded_;
-            OutputLevel               debugLevelLogFile_;          //!< The debug level for the log file (belongs to LogWriter)
             std::string               language_;                   //!< The language
             bool                      bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
Index: /code/branches/output/src/libraries/core/GUIManager.cc
===================================================================
--- /code/branches/output/src/libraries/core/GUIManager.cc	(revision 8798)
+++ /code/branches/output/src/libraries/core/GUIManager.cc	(revision 8799)
@@ -77,4 +77,5 @@
 #include "util/Math.h"
 #include "util/OrxAssert.h"
+#include "util/output/BaseWriter.h"
 #include "ConfigValueIncludes.h"
 #include "Core.h"
@@ -368,5 +369,5 @@
         SetConfigValue(guiScheme_, GUIManager::defaultScheme_).description("Changes the current GUI scheme.").callback(this, &GUIManager::changedGUIScheme);
         SetConfigValue(numScrollLines_, 1).description("How many lines to scroll in a list if the scroll wheel is used");
-        SetConfigValueExternal(outputLevelCeguiLog_, "OutputHandler", "outputLevelCeguiLog", CEGUI::Standard).description("The log level of the CEGUI log file").callback(this, &GUIManager::changedCeguiOutputLevel);
+        SetConfigValueExternal(outputLevelCeguiLog_, BaseWriter::getConfigurableSectionName(), "outputLevelCeguiLog", CEGUI::Standard).description("The log level of the CEGUI log file").callback(this, &GUIManager::changedCeguiOutputLevel);
     }
 
Index: /code/branches/output/src/libraries/core/command/IOConsolePOSIX.cc
===================================================================
--- /code/branches/output/src/libraries/core/command/IOConsolePOSIX.cc	(revision 8798)
+++ /code/branches/output/src/libraries/core/command/IOConsolePOSIX.cc	(revision 8799)
@@ -56,5 +56,5 @@
 
     IOConsole::IOConsole()
-        : shell_(new Shell("IOConsole", false))
+        : shell_(new Shell("Console", false))
         , buffer_(shell_->getInputBuffer())
         , cout_(std::cout.rdbuf())
Index: /code/branches/output/src/libraries/core/command/IOConsoleWindows.cc
===================================================================
--- /code/branches/output/src/libraries/core/command/IOConsoleWindows.cc	(revision 8798)
+++ /code/branches/output/src/libraries/core/command/IOConsoleWindows.cc	(revision 8799)
@@ -44,5 +44,5 @@
     //! Redirects std::cout, creates the corresponding Shell and changes the terminal mode
     IOConsole::IOConsole()
-        : shell_(new Shell("IOConsole", false))
+        : shell_(new Shell("Console", false))
         , buffer_(shell_->getInputBuffer())
         , cout_(std::cout.rdbuf())
Index: /code/branches/output/src/libraries/core/command/Shell.cc
===================================================================
--- /code/branches/output/src/libraries/core/command/Shell.cc	(revision 8798)
+++ /code/branches/output/src/libraries/core/command/Shell.cc	(revision 8799)
@@ -56,4 +56,10 @@
     unsigned int Shell::cacheSize_s;
 
+    namespace DefaultLogLevel
+    {
+        const OutputLevel Dev  = level::internal_warning;
+        const OutputLevel User = level::user_info;
+    }
+
     /**
         @brief Constructor: Initializes the values.
@@ -62,6 +68,6 @@
     */
     Shell::Shell(const std::string& consoleName, bool bScrollable)
-        : inputBuffer_(new InputBuffer())
-        , consoleName_(consoleName)
+        : BaseWriter(consoleName)
+        , inputBuffer_(new InputBuffer())
         , bScrollable_(bScrollable)
     {
@@ -79,4 +85,8 @@
         ConfigFileManager::getInstance().setFilename(ConfigFileType::CommandHistory, "commandHistory.ini");
 
+        // Choose the default level according to the path Orxonox was started (build directory or not)
+        OutputLevel defaultDebugLevel = (PathConfig::buildDirectoryRun() ? DefaultLogLevel::Dev : DefaultLogLevel::User);
+        this->setLevelMax(defaultDebugLevel);
+
         this->setConfigValues();
 
@@ -91,10 +101,4 @@
     {
         this->inputBuffer_->destroy();
-    }
-
-    namespace DefaultLogLevel
-    {
-        const OutputLevel Dev  = level::internal_warning;
-        const OutputLevel User = level::user_info;
     }
 
@@ -111,9 +115,22 @@
         SetConfigValue(cacheSize_s, 32);
 
-        // Choose the default level according to the path Orxonox was started (build directory or not)
-        OutputLevel defaultDebugLevel = (PathConfig::buildDirectoryRun() ? DefaultLogLevel::Dev : DefaultLogLevel::User);
-        SetConfigValueExternal(debugLevel_, "OutputHandler", "debugLevel" + consoleName_, defaultDebugLevel)
-            .description("The maximum level of debug output shown in the " + consoleName_);
-        this->setLevelMax(this->debugLevel_);
+        SetConfigValueExternal(this->configurableMaxLevel_,
+                               this->getConfigurableSectionName(),
+                               this->getConfigurableMaxLevelName(),
+                               this->configurableMaxLevel_)
+            .description("The maximum level of output shown in the " + this->getName())
+            .callback(static_cast<BaseWriter*>(this), &BaseWriter::changedConfigurableLevels);
+        SetConfigValueExternal(this->configurableContextsMaxLevel_,
+                               this->getConfigurableSectionName(),
+                               this->getConfigurableContextsMaxLevelName(),
+                               this->configurableContextsMaxLevel_)
+            .description("The maximum level of output shown in the " + this->getName() + " for additional contexts")
+            .callback(static_cast<BaseWriter*>(this), &BaseWriter::changedConfigurableLevels);
+        SetConfigValueExternal(this->configurableContexts_,
+                               this->getConfigurableSectionName(),
+                               this->getConfigurableContextsName(),
+                               this->configurableContexts_)
+            .description("Additional output contexts shown in the " + this->getName())
+            .callback(static_cast<BaseWriter*>(this), &BaseWriter::changedConfigurableLevels);
     }
 
@@ -150,10 +167,10 @@
         if (isNormal)
         {
-            ModifyConfigValueExternal(debugLevel_, "debugLevel" + consoleName_, update);
+            ModifyConfigValueExternal(debugLevel_, this->getConfigurableMaxLevelName(), update);
         }
         else
         {
             OutputLevel level = (value ? DefaultLogLevel::Dev : DefaultLogLevel::User);
-            ModifyConfigValueExternal(debugLevel_, "debugLevel" + consoleName_, tset, level);
+            ModifyConfigValueExternal(debugLevel_, this->getConfigurableMaxLevelName(), tset, level);
         }
     }
Index: /code/branches/output/src/libraries/core/command/Shell.h
===================================================================
--- /code/branches/output/src/libraries/core/command/Shell.h	(revision 8798)
+++ /code/branches/output/src/libraries/core/command/Shell.h	(revision 8799)
@@ -191,6 +191,4 @@
             unsigned int              scrollPosition_;      ///< The number of the line that is currently being referenced by scrollIterator_
             unsigned int              historyPosition_;     ///< If the user scrolls through the history of entered commands (stored in commandHistory_), this contains the currently viewed history entry
-
-            const std::string         consoleName_;         ///< The name of this shell - used to define the name of the soft-debug-level config-value
             const bool                bScrollable_;         ///< If true, the user can scroll through the output-lines
 
Index: /code/branches/output/src/libraries/util/output/BaseWriter.cc
===================================================================
--- /code/branches/output/src/libraries/util/output/BaseWriter.cc	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/BaseWriter.cc	(revision 8799)
@@ -33,6 +33,10 @@
 namespace orxonox
 {
-    BaseWriter::BaseWriter()
+    BaseWriter::BaseWriter(const std::string& name)
     {
+        this->name_ = name;
+
+        this->configurableMaxLevel_ = level::none;
+        this->configurableContextsMaxLevel_ = level::verbose;
     }
 
@@ -43,9 +47,38 @@
     void BaseWriter::output(OutputLevel level, OutputContext context, const std::vector<std::string>& lines)
     {
-        const std::string& prefix = OutputManager::getInstance().getDefaultPrefix(level, context);
-        std::string blanks(prefix.length(), ' ');
+        if (level <= this->configurableMaxLevel_ || (level <= this->configurableContextsMaxLevel_ && this->isAdditionalContext(context)))
+        {
+            const std::string& prefix = OutputManager::getInstance().getDefaultPrefix(level, context);
+            std::string blanks(prefix.length(), ' ');
 
-        for (size_t i = 0; i < lines.size(); ++i)
-            this->printLine((i == 0 ? prefix : blanks) + lines[i], level);
+            for (size_t i = 0; i < lines.size(); ++i)
+                this->printLine((i == 0 ? prefix : blanks) + lines[i], level);
+        }
+    }
+
+    void BaseWriter::setLevelMax(OutputLevel max)
+    {
+        this->configurableMaxLevel_ = max;
+        this->changedConfigurableLevels();
+    }
+
+    void BaseWriter::changedConfigurableLevels()
+    {
+        OutputLevel max_level = std::max(this->configurableMaxLevel_, this->configurableContextsMaxLevel_);
+        OutputListener::setLevelMax(max_level);
+    }
+
+    void BaseWriter::changedConfigurableContexts()
+    {
+        this->configurableContextsSet_.clear();
+        for (size_t i = 0; i < this->configurableContexts_.size(); ++i)
+            this->configurableContextsSet_.insert(this->configurableContexts_[i]);
+    }
+
+    bool BaseWriter::isAdditionalContext(OutputContext context) const
+    {
+        const std::string& name = OutputManager::getInstance().getContextName(context);
+        std::set<std::string>::const_iterator it = this->configurableContextsSet_.find(name);
+        return (it != this->configurableContextsSet_.end());
     }
 }
Index: /code/branches/output/src/libraries/util/output/BaseWriter.h
===================================================================
--- /code/branches/output/src/libraries/util/output/BaseWriter.h	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/BaseWriter.h	(revision 8799)
@@ -31,4 +31,8 @@
 
 #include "util/UtilPrereqs.h"
+
+#include <set>
+#include <vector>
+
 #include "OutputListener.h"
 
@@ -38,6 +42,29 @@
     {
         public:
-            BaseWriter();
+            BaseWriter(const std::string& name);
             virtual ~BaseWriter();
+
+            const std::string& getName() const
+                { return this->name_; }
+
+            void setLevelMax(OutputLevel max);
+
+            OutputLevel configurableMaxLevel_;
+            inline std::string getConfigurableMaxLevelName() const
+                { return "outputLevel" + this->name_; }
+
+            OutputLevel configurableContextsMaxLevel_;
+            inline std::string getConfigurableContextsMaxLevelName() const
+                { return "outputContextsLevel" + this->name_; }
+
+            std::vector<std::string> configurableContexts_;
+            inline std::string getConfigurableContextsName() const
+                { return "outputContexts" + this->name_; }
+
+            void changedConfigurableLevels();
+            void changedConfigurableContexts();
+
+            static inline std::string getConfigurableSectionName()
+                { return "Output"; }
 
         protected:
@@ -46,4 +73,12 @@
         private:
             virtual void printLine(const std::string& line, OutputLevel level) = 0;
+
+            void setLevelRange(OutputLevel min, OutputLevel max);
+            void setLevelMask(OutputLevel mask);
+
+            bool isAdditionalContext(OutputContext context) const;
+
+            std::string name_;
+            std::set<std::string> configurableContextsSet_;
     };
 }
Index: /code/branches/output/src/libraries/util/output/ConsoleWriter.cc
===================================================================
--- /code/branches/output/src/libraries/util/output/ConsoleWriter.cc	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/ConsoleWriter.cc	(revision 8799)
@@ -35,5 +35,5 @@
 namespace orxonox
 {
-    ConsoleWriter::ConsoleWriter()
+    ConsoleWriter::ConsoleWriter() : BaseWriter("Console")
     {
 #ifdef ORXONOX_RELEASE
Index: /code/branches/output/src/libraries/util/output/LogWriter.cc
===================================================================
--- /code/branches/output/src/libraries/util/output/LogWriter.cc	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/LogWriter.cc	(revision 8799)
@@ -36,9 +36,9 @@
 namespace orxonox
 {
-    LogWriter::LogWriter()
+    LogWriter::LogWriter() : BaseWriter("Log")
     {
         this->setLevelMax(level::internal_info);
 
-        this->filename_ = "orxonox2.log";
+        this->filename_ = "orxonox.log";
 
         // Get path for a temporary file
Index: /code/branches/output/src/libraries/util/output/OutputDefinitions.h
===================================================================
--- /code/branches/output/src/libraries/util/output/OutputDefinitions.h	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/OutputDefinitions.h	(revision 8799)
@@ -44,4 +44,5 @@
         static const OutputLevel all              = 0xFFFF;
         static const OutputLevel none             = 0x0000;
+
         static const OutputLevel debug_output     = 0x0001;
         static const OutputLevel user_error       = 0x0002;
Index: /code/branches/output/src/libraries/util/output/OutputManager.cc
===================================================================
--- /code/branches/output/src/libraries/util/output/OutputManager.cc	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/OutputManager.cc	(revision 8799)
@@ -166,4 +166,13 @@
     }
 
+    OutputContext OutputManager::getContextValue(const std::string& name) const
+    {
+        boost::bimap<OutputContext, std::string>::right_map::const_iterator it = this->contexts_.right.find(name);
+        if (it != this->contexts_.right.end())
+            return it->second;
+        else
+            return context::none;
+    }
+
     std::string OutputManager::getComposedContextName(OutputContext context) const
     {
Index: /code/branches/output/src/libraries/util/output/OutputManager.h
===================================================================
--- /code/branches/output/src/libraries/util/output/OutputManager.h	(revision 8798)
+++ /code/branches/output/src/libraries/util/output/OutputManager.h	(revision 8799)
@@ -66,4 +66,6 @@
             const std::string& getLevelName(OutputLevel level) const;
             const std::string& getContextName(OutputContext context) const;
+            OutputContext getContextValue(const std::string& name) const;
+
             std::string getComposedContextName(OutputContext context) const;
             std::string getDefaultPrefix(OutputLevel level, OutputContext context) const;
