31 #include <QTextStream>
32 #include <QProcessEnvironment>
46 QTextStream(stderr) <<
"[Warning] " << msg << endl;
50 QTextStream(stderr) <<
"[Critical] " << msg << endl;
54 QTextStream(stderr) <<
"[FATAL] " << msg << endl;
58 QString(context.function));
62 : IUAVGadgetFactory(QString(
"DebugGadget"), tr(
"DebugGadget"), parent)
64 QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
65 if (env.contains(
"NO_DEBUG_GADGET"))
67 "Debug gadget disabled by NO_DEBUG_GADGET env. var.");
80 return new DebugGadget(QString(
"DebugGadget"), gadgetWidget, parent);
void message(DebugEngine::Level level, const QString &msg, const QString &file="", const int line=0, const QString &function="")
IUAVGadget * createGadget(QWidget *parent)
void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
DebugGadgetFactory(QObject *parent=nullptr)
static DebugEngine * getInstance()