Remvoe logger code

This commit is contained in:
Hannah von Reth 2015-12-05 18:53:59 +01:00
parent 638cad776e
commit 415ba49d1d

View File

@ -54,24 +54,6 @@ SnoreCore &SnoreCore::instance()
qRegisterMetaType<Notification>();
qRegisterMetaType<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);
SnoreCorePrivate::instance()->init();
}