mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-23 05:28:05 +00:00
Remvoe logger code
This commit is contained in:
parent
638cad776e
commit
415ba49d1d
@ -54,24 +54,6 @@ SnoreCore &SnoreCore::instance()
|
|||||||
qRegisterMetaType<Notification>();
|
qRegisterMetaType<Notification>();
|
||||||
qRegisterMetaType<SnorePlugin::PluginTypes>();
|
qRegisterMetaType<SnorePlugin::PluginTypes>();
|
||||||
qRegisterMetaTypeStreamOperators<SnorePlugin::PluginTypes>();
|
qRegisterMetaTypeStreamOperators<SnorePlugin::PluginTypes>();
|
||||||
if (qEnvironmentVariableIsSet("LIBSNORE_DEBUG")) {
|
|
||||||
auto printer = [](QtMsgType type, const QMessageLogContext & context, const QString & msg) {
|
|
||||||
QByteArray localMsg = msg.toLocal8Bit();
|
|
||||||
switch (type) {
|
|
||||||
case QtDebugMsg:
|
|
||||||
fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
|
||||||
break;
|
|
||||||
case QtWarningMsg:
|
|
||||||
fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
|
||||||
break;
|
|
||||||
case QtFatalMsg:
|
|
||||||
fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
fflush(stderr);
|
|
||||||
};
|
|
||||||
qInstallMessageHandler(printer);
|
|
||||||
}
|
|
||||||
instance = new SnoreCore(qApp);
|
instance = new SnoreCore(qApp);
|
||||||
SnoreCorePrivate::instance()->init();
|
SnoreCorePrivate::instance()->init();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user