Skip to content
Snippets Groups Projects
Commit 63c01f14 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

misc: filter some noisy logs

Change-Id: I799e8f66e2008323817c73292f94e8c625564d67
parent 73aeb02e
Branches
No related merge requests found
......@@ -20,6 +20,8 @@
#include "appsettingsmanager.h"
#include "global.h"
#include <QCoreApplication>
#include <QLibraryInfo>
......@@ -101,7 +103,7 @@ AppSettingsManager::loadTranslations()
installedTr_.clear();
QString locale_name = getLanguage();
qDebug() << QString("Using locale: %1").arg(locale_name);
C_INFO << QString("Using locale: %1").arg(locale_name);
QString locale_lang = locale_name.split('_')[0];
QTranslator* qtTranslator_lang = new QTranslator(qApp);
......
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "global.h"
#ifndef _WIN32
#include <glib.h>
#include <gio/gio.h>
......@@ -171,10 +173,10 @@ static void
logConnectionInfo(NMActiveConnection* connection)
{
if (connection) {
qDebug() << "primary network connection:" << nm_active_connection_get_uuid(connection)
<< "default: " << (nm_active_connection_get_default(connection) ? "yes" : "no");
C_INFO << "primary network connection:" << nm_active_connection_get_uuid(connection)
<< "default: " << (nm_active_connection_get_default(connection) ? "yes" : "no");
} else {
qWarning() << "no primary network connection detected, check network settings";
C_WARN << "no primary network connection detected, check network settings";
}
}
......@@ -191,11 +193,10 @@ nmClientCallback(G_GNUC_UNUSED GObject* source_object, GAsyncResult* result, Con
{
GError* error = nullptr;
if (auto nm_client = nm_client_new_finish(result, &error)) {
qDebug() << "NetworkManager client initialized, version: "
<< nm_client_get_version(nm_client)
<< ", daemon running:" << (nm_client_get_nm_running(nm_client) ? "yes" : "no")
<< ", networking enabled:"
<< (nm_client_networking_get_enabled(nm_client) ? "yes" : "no");
C_INFO << "NetworkManager client initialized, version: " << nm_client_get_version(nm_client)
<< ", daemon running:" << (nm_client_get_nm_running(nm_client) ? "yes" : "no")
<< ", networking enabled:"
<< (nm_client_networking_get_enabled(nm_client) ? "yes" : "no");
auto connection = nm_client_get_primary_connection(nm_client);
logConnectionInfo(connection);
......@@ -205,7 +206,7 @@ nmClientCallback(G_GNUC_UNUSED GObject* source_object, GAsyncResult* result, Con
cm);
} else {
qWarning() << "error initializing NetworkManager client: " << error->message;
C_WARN << "error initializing NetworkManager client: " << error->message;
g_clear_error(&error);
}
}
......@@ -222,7 +223,7 @@ ConnectivityMonitor::ConnectivityMonitor(QObject* parent)
ConnectivityMonitor::~ConnectivityMonitor()
{
qDebug() << "Destroying connectivity monitor";
C_DBG << "Destroying connectivity monitor";
}
bool
......
......@@ -18,6 +18,7 @@
#include "currentcall.h"
#include "callparticipantsmodel.h"
#include "global.h"
#include <api/callparticipantsmodel.h>
#include <api/devicemodel.h>
......@@ -348,7 +349,7 @@ CurrentCall::onCurrentAccountIdChanged()
auto& accInfo = lrcInstance_->getCurrentAccountInfo();
set_isSIP(accInfo.profileInfo.type == profile::Type::SIP);
} catch (const std::exception& e) {
qWarning() << "Can't update current call type" << e.what();
C_DBG << "Can't update current call type" << e.what();
}
connectModel();
......
......@@ -162,6 +162,8 @@ MainApplication::MainApplication(int& argc, char** argv)
"libclient.debug=false\n"
"qt.*=false\n"
"qml.debug=false\n"
"default.debug=false\n"
"client.debug=false\n"
"\n");
// These can be set in the environment as well.
// e.g. QT_LOGGING_RULES="*.debug=false;qml.debug=true"
......@@ -449,7 +451,7 @@ MainApplication::initQmlLayer()
engine_->load(url);
// Report the render interface used.
C_DBG << "Main window loaded using" << getRenderInterfaceString();
C_INFO << "Main window loaded using" << getRenderInterfaceString();
}
void
......
......@@ -18,6 +18,8 @@
#include "screensaver.h"
#include "global.h"
#include <QDebug>
ScreenSaver::ScreenSaver(QObject* parent)
......@@ -31,8 +33,7 @@ ScreenSaver::ScreenSaver(QObject* parent)
}
#else
: QObject(parent)
{
}
{}
#endif
#ifdef Q_OS_LINUX
......@@ -50,7 +51,7 @@ ScreenSaver::createInterface(void)
services_[i],
sessionBus_);
if (screenSaverInterface_ && screenSaverInterface_->isValid()) {
qDebug() << "Screen saver dbus interface: " << services_[i];
C_INFO << "Screen saver dbus interface: " << services_[i];
return true;
}
}
......
......@@ -19,6 +19,7 @@
#include "systemtray.h"
#include "appsettingsmanager.h"
#include "global.h"
#ifdef USE_LIBNOTIFY
#include <libnotify/notification.h>
......@@ -106,8 +107,8 @@ SystemTray::SystemTray(AppSettingsManager* settingsManager, QObject* parent)
char* spec = nullptr;
if (notify_get_server_info(&name, &vendor, &version, &spec)) {
qDebug() << QString("notify server name: %1, vendor: %2, version: %3, spec: %4")
.arg(name, vendor, version, spec);
C_INFO << QString("notify server name: %1, vendor: %2, version: %3, spec: %4")
.arg(name, vendor, version, spec);
}
// check notify server capabilities
......@@ -167,7 +168,7 @@ SystemTray::hideNotification(const QString& id)
// Close
GError* error = nullptr;
if (!notify_notification_close(notification->second.nn.get(), &error)) {
qWarning("could not close notification: %s", error->message);
C_WARN << QString("could not close notification: %1").arg(error->message);
g_clear_error(&error);
return false;
}
......@@ -235,7 +236,7 @@ SystemTray::showNotification(const QString& id,
GError* error = nullptr;
notify_notification_show(notification.get(), &error);
if (error) {
qWarning("failed to show notification: %s", error->message);
C_WARN << QString("failed to show notification: %1").arg(error->message);
g_clear_error(&error);
}
#else
......
......@@ -24,6 +24,7 @@
#include "jamiavatartheme.h"
#include "lrcinstance.h"
#include "global.h"
#include <api/contact.h>
......@@ -488,7 +489,7 @@ Utils::conversationAvatar(LRCInstance* instance,
painter.drawImage(avatar.rect(), peerAAvatar);
painter.drawImage(avatar.rect(), peerBAvatar);
} catch (const std::exception& e) {
qDebug() << Q_FUNC_INFO << e.what();
C_DBG << e.what();
}
return avatar;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment