Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2011, 12:54:55 AM (13 years ago)
Author:
landauf
Message:

adjusted the rest of the code to the new output system, but some changes have to be reviewed.
all output is currently printed with debug level.
compiles again (posix console untested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/Core.cc

    r8788 r8796  
    5151#endif
    5252
     53#include <boost/preprocessor/stringize.hpp>
     54
    5355#include "util/Clock.h"
    5456#include "util/Output.h"
    5557#include "util/Exception.h"
     58#include "util/output/LogWriter.h"
    5659#include "util/Scope.h"
    5760#include "util/ScopedSingletonManager.h"
     
    142145        this->signalHandler_->doCatch(PathConfig::getExecutablePathString(), PathConfig::getLogPathString() + "orxonox_crash.log");
    143146
    144         // Set the correct log path. Before this call, /tmp (Unix) or %TEMP% (Windows) was used
    145         OutputHandler::getInstance().setLogPath(PathConfig::getLogPathString());
    146 
    147147#ifdef ORXONOX_PLATFORM_WINDOWS
    148148        // limit the main thread to the first core so that QueryPerformanceCounter doesn't jump
     
    166166        RegisterRootObject(Core);
    167167        this->setConfigValues();
    168         // Rewrite the log file with the correct log levels
    169         OutputHandler::getInstance().rewriteLogFile();
     168
     169        // Set the correct log path and rewrite the log file with the correct log levels
     170        LogWriter::getInstance().setLogPath(PathConfig::getLogPathString());
    170171
    171172#if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN)
     
    232233    namespace DefaultLevelLogFile
    233234    {
    234         const OutputLevel::Value Dev  = OutputLevel::Debug;
    235         const OutputLevel::Value User = OutputLevel::Info;
     235#pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: inspect this (and remove boost include)")
     236        const OutputLevel Dev  = level::internal_info;
     237        const OutputLevel User = level::internal_info;
    236238    }
    237239
     
    240242    {
    241243        // Choose the default level according to the path Orxonox was started (build directory or not)
    242         OutputLevel::Value defaultLogLevel = (PathConfig::buildDirectoryRun() ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
     244        OutputLevel defaultLogLevel = (PathConfig::buildDirectoryRun() ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
    243245
    244246        SetConfigValueExternal(debugLevelLogFile_, "OutputHandler", "debugLevelLogFile", defaultLogLevel)
    245247            .description("The maximum level of debug output written to the log file");
    246         OutputHandler::getInstance().setSoftDebugLevel("LogFile", debugLevelLogFile_);
     248        LogWriter::getInstance().setLevelMax(this->debugLevelLogFile_);
    247249
    248250        SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun())
     
    286288        else
    287289        {
    288             OutputLevel::Value level = (bDevMode_ ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
     290            OutputLevel level = (bDevMode_ ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
    289291            ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", tset, level);
    290292        }
Note: See TracChangeset for help on using the changeset viewer.