diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-20 18:20:38 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-20 18:21:04 +0200 |
commit | 22eee9e798f00f9e58d1dc0f1b893abee2582ba2 (patch) | |
tree | a5873370e128a2d03384d5b7ebc2d175fd6dd49a /common/resourceaccess.cpp | |
parent | 315524e15da36da523ccbf701c061fbb5a5d34ec (diff) | |
download | sink-22eee9e798f00f9e58d1dc0f1b893abee2582ba2.tar.gz sink-22eee9e798f00f9e58d1dc0f1b893abee2582ba2.zip |
Made the log-level output a lot less noisy
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 5ad2018..d3bd85f 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -230,7 +230,7 @@ KAsync::Job<void> ResourceAccess::Private::initializeSocket() | |||
230 | ResourceAccess::ResourceAccess(const QByteArray &resourceInstanceIdentifier, const QByteArray &resourceType) | 230 | ResourceAccess::ResourceAccess(const QByteArray &resourceInstanceIdentifier, const QByteArray &resourceType) |
231 | : ResourceAccessInterface(), d(new Private(resourceType, resourceInstanceIdentifier, this)) | 231 | : ResourceAccessInterface(), d(new Private(resourceType, resourceInstanceIdentifier, this)) |
232 | { | 232 | { |
233 | Log() << "Starting access"; | 233 | Trace() << "Starting access"; |
234 | } | 234 | } |
235 | 235 | ||
236 | ResourceAccess::~ResourceAccess() | 236 | ResourceAccess::~ResourceAccess() |
@@ -415,7 +415,7 @@ void ResourceAccess::sendCommand(const QSharedPointer<QueuedCommand> &command) | |||
415 | // TODO: we should have a timeout for commands | 415 | // TODO: we should have a timeout for commands |
416 | d->messageId++; | 416 | d->messageId++; |
417 | const auto messageId = d->messageId; | 417 | const auto messageId = d->messageId; |
418 | Log() << QString("Sending command \"%1\" with messageId %2").arg(QString(Sink::Commands::name(command->commandId))).arg(d->messageId); | 418 | Trace() << QString("Sending command \"%1\" with messageId %2").arg(QString(Sink::Commands::name(command->commandId))).arg(d->messageId); |
419 | Q_ASSERT(command->callback); | 419 | Q_ASSERT(command->callback); |
420 | registerCallback(d->messageId, [this, messageId, command](int errorCode, QString errorMessage) { | 420 | registerCallback(d->messageId, [this, messageId, command](int errorCode, QString errorMessage) { |
421 | Trace() << "Command complete " << messageId; | 421 | Trace() << "Command complete " << messageId; |
@@ -456,7 +456,7 @@ void ResourceAccess::connected() | |||
456 | return; | 456 | return; |
457 | } | 457 | } |
458 | 458 | ||
459 | Log() << QString("Connected: %1").arg(d->socket->fullServerName()); | 459 | Trace() << QString("Connected: %1").arg(d->socket->fullServerName()); |
460 | 460 | ||
461 | { | 461 | { |
462 | flatbuffers::FlatBufferBuilder fbb; | 462 | flatbuffers::FlatBufferBuilder fbb; |
@@ -533,7 +533,7 @@ bool ResourceAccess::processMessageBuffer() | |||
533 | switch (commandId) { | 533 | switch (commandId) { |
534 | case Commands::RevisionUpdateCommand: { | 534 | case Commands::RevisionUpdateCommand: { |
535 | auto buffer = Commands::GetRevisionUpdate(d->partialMessageBuffer.constData() + headerSize); | 535 | auto buffer = Commands::GetRevisionUpdate(d->partialMessageBuffer.constData() + headerSize); |
536 | Log() << QString("Revision updated to: %1").arg(buffer->revision()); | 536 | Trace() << QString("Revision updated to: %1").arg(buffer->revision()); |
537 | Notification n; | 537 | Notification n; |
538 | n.type = Sink::Commands::NotificationType::NotificationType_RevisionUpdate; | 538 | n.type = Sink::Commands::NotificationType::NotificationType_RevisionUpdate; |
539 | emit notification(n); | 539 | emit notification(n); |
@@ -543,7 +543,7 @@ bool ResourceAccess::processMessageBuffer() | |||
543 | } | 543 | } |
544 | case Commands::CommandCompletionCommand: { | 544 | case Commands::CommandCompletionCommand: { |
545 | auto buffer = Commands::GetCommandCompletion(d->partialMessageBuffer.constData() + headerSize); | 545 | auto buffer = Commands::GetCommandCompletion(d->partialMessageBuffer.constData() + headerSize); |
546 | Log() << QString("Command with messageId %1 completed %2").arg(buffer->id()).arg(buffer->success() ? "sucessfully" : "unsuccessfully"); | 546 | Trace() << QString("Command with messageId %1 completed %2").arg(buffer->id()).arg(buffer->success() ? "sucessfully" : "unsuccessfully"); |
547 | 547 | ||
548 | d->completeCommands.insert(buffer->id(), buffer->success()); | 548 | d->completeCommands.insert(buffer->id(), buffer->success()); |
549 | // The callbacks can result in this object getting destroyed directly, so we need to ensure we finish our work first | 549 | // The callbacks can result in this object getting destroyed directly, so we need to ensure we finish our work first |
@@ -558,7 +558,7 @@ bool ResourceAccess::processMessageBuffer() | |||
558 | close(); | 558 | close(); |
559 | break; | 559 | break; |
560 | case Sink::Commands::NotificationType::NotificationType_Inspection: { | 560 | case Sink::Commands::NotificationType::NotificationType_Inspection: { |
561 | Log() << "Received inspection notification."; | 561 | Trace() << "Received inspection notification."; |
562 | Notification n; | 562 | Notification n; |
563 | if (buffer->identifier()) { | 563 | if (buffer->identifier()) { |
564 | // Don't use fromRawData, the buffer is gone once we invoke emit notification | 564 | // Don't use fromRawData, the buffer is gone once we invoke emit notification |