28 #define FUNCTION_NAME __PRETTY_FUNCTION__
30 #define FUNCTION_NAME __FUNCTION__
33 #define ol_debug(l) Debug(FUNCTION_NAME, l)
40 #ifdef DEBUG_QSTRING_SUPPORT
59 std::stringstream data;
62 bool enableOutput()
const
65 #ifdef DEBUG_DISABLE_OUTPUT
69 if (level == Level::Debug)
77 Debug(
const char *f_name, DebugLevel::Level l = Level::Info): data(), level(l)
81 data << f_name <<
": ";
91 std::clog << data.str() << std::endl;
94 template <
typename T>
Debug& operator<<(
const T &arg)
102 template <
typename T>
Debug& operator<<(const std::vector<T *> &v)
106 data << *item <<
"; ";
111 template <
typename T>
Debug& operator<<(const std::vector<T> &v)
115 data << item <<
"; ";
120 #ifdef DEBUG_QSTRING_SUPPORT
121 Debug& operator<<(
const QString &arg)
123 return (*
this) << arg.toLocal8Bit().data();