Changeset 244 in pacpusframework


Ignore:
Timestamp:
Dec 2, 2013, 12:30:29 PM (11 years ago)
Author:
Marek Kurdej
Message:

Minor: debug/info level on console.

Location:
trunk/src/PacpusLib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PacpusLib/ColorSeverityFormatter.hpp

    r243 r244  
    1818#if defined(PACPUS_LOG_COLORED_OUTPUT)
    1919
     20#include <boost/assert.hpp>
    2021#include <boost/log/attributes/attribute_name.hpp>
    2122#include <boost/log/attributes/fallback_policy.hpp>
     
    8586    case COLOR_CYAN:    return FOREGROUND_GREEN | FOREGROUND_BLUE;
    8687    case COLOR_WHITE:   return FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
    87     default:            return 0;
     88    case COLOR_DEFAULT: return 0;
     89    default:
     90        BOOST_ASSERT(false && "wrong Color enum value");
     91        return 0;
    8892    }
    8993}
     
    195199        : mStreamHandle(GetStdHandle(STD_OUTPUT_HANDLE))
    196200        //, mSavedConsoleBufferInfo(savedConsoleBufferInfo)
    197         , mSavedConsoleBufferInfo(getColorAttribute(COLOR_WHITE) | FOREGROUND_INTENSITY) // FIXME: restore old value, not just reset
     201        , mSavedConsoleBufferInfo(getColorAttribute(COLOR_WHITE)) // FIXME: restore old value, not just reset
    198202#endif // defined(PACPUS_OS_WINDOWS) && !defined(PACPUS_OS_WINDOWS_MOBILE)
    199203    {
  • trunk/src/PacpusLib/Log.cpp

    r239 r244  
    3030#include <ostream>
    3131#include <QString>
     32
     33//template <typename CharT>
     34//PACPUSLIB_API std::basic_ostream<CharT>& operator<< (std::basic_ostream<CharT>& strm, QString const& s)
     35//{
     36//    strm << s.toLocal8Bit().data();
     37//    return strm;
     38//}
    3239
    3340// specialization for char
     
    151158    sink->set_filter
    152159    (
     160#ifdef NDEBUG
     161        // release
    153162        severity >= info
     163#else
     164        // debug
     165        severity >= debug
     166#endif
    154167    );
    155168
Note: See TracChangeset for help on using the changeset viewer.