diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-18 12:16:34 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-18 12:16:34 +0200 |
commit | a35acab8ecdadb5547c445a41ca2a67d978ed4a6 (patch) | |
tree | 64633dc0345ce82796da553dc28c25323f50aadd /synchronizer/listener.cpp | |
parent | e2857def8e67c3a95656f9d4737beba93a38c53a (diff) | |
download | sink-a35acab8ecdadb5547c445a41ca2a67d978ed4a6.tar.gz sink-a35acab8ecdadb5547c445a41ca2a67d978ed4a6.zip |
Log messages
Diffstat (limited to 'synchronizer/listener.cpp')
-rw-r--r-- | synchronizer/listener.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synchronizer/listener.cpp b/synchronizer/listener.cpp index 64e9c21..c68bd9a 100644 --- a/synchronizer/listener.cpp +++ b/synchronizer/listener.cpp | |||
@@ -48,7 +48,7 @@ Listener::Listener(const QByteArray &resourceName, QObject *parent) | |||
48 | this, &Listener::refreshRevision); | 48 | this, &Listener::refreshRevision); |
49 | connect(m_server, &QLocalServer::newConnection, | 49 | connect(m_server, &QLocalServer::newConnection, |
50 | this, &Listener::acceptConnection); | 50 | this, &Listener::acceptConnection); |
51 | Log() << "Trying to open " << m_resourceName; | 51 | Trace() << "Trying to open " << m_resourceName; |
52 | if (!m_server->listen(QString::fromLatin1(resourceName))) { | 52 | if (!m_server->listen(QString::fromLatin1(resourceName))) { |
53 | // FIXME: multiple starts need to be handled here | 53 | // FIXME: multiple starts need to be handled here |
54 | m_server->removeServer(resourceName); | 54 | m_server->removeServer(resourceName); |
@@ -99,7 +99,7 @@ void Listener::closeAllConnections() | |||
99 | 99 | ||
100 | void Listener::acceptConnection() | 100 | void Listener::acceptConnection() |
101 | { | 101 | { |
102 | Log() << QString("Accepting connection"); | 102 | Trace() << "Accepting connection"; |
103 | QLocalSocket *socket = m_server->nextPendingConnection(); | 103 | QLocalSocket *socket = m_server->nextPendingConnection(); |
104 | 104 | ||
105 | if (!socket) { | 105 | if (!socket) { |
@@ -154,7 +154,7 @@ void Listener::readFromSocket() | |||
154 | return; | 154 | return; |
155 | } | 155 | } |
156 | 156 | ||
157 | Log() << "Reading from socket..."; | 157 | Trace() << "Reading from socket..."; |
158 | for (Client &client: m_connections) { | 158 | for (Client &client: m_connections) { |
159 | if (client.socket == socket) { | 159 | if (client.socket == socket) { |
160 | client.commandBuffer += socket->readAll(); | 160 | client.commandBuffer += socket->readAll(); |
@@ -232,7 +232,7 @@ void Listener::processCommand(int commandId, uint messageId, Client &client, uin | |||
232 | case Akonadi2::Commands::DeleteEntityCommand: | 232 | case Akonadi2::Commands::DeleteEntityCommand: |
233 | case Akonadi2::Commands::ModifyEntityCommand: | 233 | case Akonadi2::Commands::ModifyEntityCommand: |
234 | case Akonadi2::Commands::CreateEntityCommand: | 234 | case Akonadi2::Commands::CreateEntityCommand: |
235 | Log() << QString("\tCommand id %1 of type %2 from %3").arg(messageId).arg(commandId).arg(client.name); | 235 | Log() << "\tCommand id " << messageId << " of type \"" << Akonadi2::Commands::name(commandId) << "\" from " << client.name; |
236 | loadResource(); | 236 | loadResource(); |
237 | if (m_resource) { | 237 | if (m_resource) { |
238 | m_resource->processCommand(commandId, client.commandBuffer, size, m_pipeline); | 238 | m_resource->processCommand(commandId, client.commandBuffer, size, m_pipeline); |
@@ -293,7 +293,7 @@ bool Listener::processClientBuffer(Client &client) | |||
293 | auto socket = QPointer<QLocalSocket>(client.socket); | 293 | auto socket = QPointer<QLocalSocket>(client.socket); |
294 | auto clientName = client.name; | 294 | auto clientName = client.name; |
295 | processCommand(commandId, messageId, client, size, [this, messageId, commandId, socket, clientName]() { | 295 | processCommand(commandId, messageId, client, size, [this, messageId, commandId, socket, clientName]() { |
296 | Log() << QString("\tCompleted command messageid %1 of type %2 from %3").arg(messageId).arg(commandId).arg(clientName); | 296 | Log() << QString("\tCompleted command messageid %1 of type \"%2\" from %3").arg(messageId).arg(QString(Akonadi2::Commands::name(commandId))).arg(clientName); |
297 | if (socket) { | 297 | if (socket) { |
298 | sendCommandCompleted(socket.data(), messageId); | 298 | sendCommandCompleted(socket.data(), messageId); |
299 | } else { | 299 | } else { |