diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-05-09 15:24:11 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-05-11 18:22:59 +0300 |
commit | 4ad190a558c64aac846dc828438acdec5fe9c6ed (patch) | |
tree | 92879909a4036fd51f7ece53654a0474298409c6 /src/gui/notificationwidget.cpp | |
parent | 3a193655b3bdb9634c753e9e7b73a56469249655 (diff) |
Use Qt logging categories for logging
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.
Issue #5647
Diffstat (limited to 'src/gui/notificationwidget.cpp')
-rw-r--r-- | src/gui/notificationwidget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/notificationwidget.cpp b/src/gui/notificationwidget.cpp index 7aa317802..f247ec2c5 100644 --- a/src/gui/notificationwidget.cpp +++ b/src/gui/notificationwidget.cpp @@ -23,6 +23,8 @@ namespace OCC { +Q_LOGGING_CATEGORY(lcNotifications, "gui.notifications", QtInfoMsg) + NotificationWidget::NotificationWidget(QWidget *parent) : QWidget(parent) { _ui.setupUi(this); @@ -109,7 +111,7 @@ void NotificationWidget::slotButtonClicked() _actionLabel = triggeredLink._label; if( ! triggeredLink._link.isEmpty() ) { - qDebug() << Q_FUNC_INFO << "Notification Link: "<< triggeredLink._verb << triggeredLink._link; + qCDebug(lcNotifications) << "Notification Link: "<< triggeredLink._verb << triggeredLink._link; _progressIndi->startAnimation(); emit sendNotificationRequest( _accountName, triggeredLink._link, triggeredLink._verb ); } @@ -127,7 +129,7 @@ void NotificationWidget::slotNotificationRequestFinished(int statusCode) // the ocs API returns stat code 100 if it succeeded. if( statusCode != OCS_SUCCESS_STATUS_CODE ) { - qDebug() << Q_FUNC_INFO << "Notification Request to Server failed, leave button visible."; + qCDebug(lcNotifications) << "Notification Request to Server failed, leave button visible."; for( i = 0; i < _buttons.count(); i++ ) { _buttons.at(i)->setEnabled(true); } |