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/GUIManager.cc

    r8788 r8796  
    3333#include <memory>
    3434#include <boost/bind.hpp>
     35#include <boost/preprocessor/stringize.hpp>
    3536#include <OgreRenderQueue.h>
    3637#include <OgreRenderWindow.h>
     
    101102        void logEvent(const CEGUI::String& message, CEGUI::LoggingLevel level = CEGUI::Standard)
    102103        {
    103             int orxonoxLevel = CEGUI::Standard;
     104            OutputLevel orxonoxLevel = level::debug_output;
    104105            switch (level)
    105106            {
    106                 case CEGUI::Errors:      orxonoxLevel = 1; break;
    107                 case CEGUI::Warnings:    orxonoxLevel = 2; break;
    108                 case CEGUI::Standard:    orxonoxLevel = 4; break;
    109                 case CEGUI::Informative: orxonoxLevel = 5; break;
    110                 case CEGUI::Insane:      orxonoxLevel = 6; break;
     107                case CEGUI::Errors:      orxonoxLevel = level::internal_error; break;
     108                case CEGUI::Warnings:    orxonoxLevel = level::internal_warning; break;
     109                case CEGUI::Standard:    orxonoxLevel = level::internal_status; break;
     110                case CEGUI::Informative: orxonoxLevel = level::internal_info; break;
     111                case CEGUI::Insane:      orxonoxLevel = level::verbose; break;
    111112                default: OrxAssert(false, "CEGUI log level out of range, inspect immediately!");
    112113            }
    113             OutputHandler::getOutStream(orxonoxLevel)
    114                 << "CEGUI: " << message << std::endl;
     114
     115#pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: use correct level (and remove boost include)")
     116            orxout(debug_output, context::cegui) << "CEGUI (level: " << level << "): " << message << endl;
    115117
    116118            CEGUI::DefaultLogger::logEvent(message, level);
     
    263265
    264266        this->oldCEGUI_ = false;
    265        
     267
    266268        // Note: No SceneManager specified yet
    267269#ifdef ORXONOX_OLD_CEGUI
     
    300302        std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
    301303        ceguiLogger->setLogFilename(PathConfig::getLogPathString() + "cegui.log");
    302         // Set the log level according to ours (translate by subtracting 1)
    303         ceguiLogger->setLoggingLevel(
    304             static_cast<LoggingLevel>(OutputHandler::getInstance().getSoftDebugLevel("logFile") - 1));
     304#pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: inspect this (and remove boost include)")
     305//        // Set the log level according to ours (translate by subtracting 1)
     306//        ceguiLogger->setLoggingLevel(
     307//            static_cast<LoggingLevel>(OutputHandler::getInstance().getSoftDebugLevel("logFile") - 1));
    305308        this->ceguiLogger_ = ceguiLogger.release();
    306309
Note: See TracChangeset for help on using the changeset viewer.