Commit 32762e27 authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: Use more distinct ipc logging prefix

The previous "<<<" and ">>>" are visually hard to catch in the output.

Change-Id: I7313645454d92ca3534b19070173129676d49e18
Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
parent 593d3955
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#define qCDebugIpc() qCDebug(ipcLog) << "<===="
using namespace ClangBackEnd; using namespace ClangBackEnd;
namespace ClangCodeModel { namespace ClangCodeModel {
...@@ -153,20 +155,20 @@ void BackendReceiver::reset() ...@@ -153,20 +155,20 @@ void BackendReceiver::reset()
void BackendReceiver::alive() void BackendReceiver::alive()
{ {
if (printAliveMessage()) if (printAliveMessage())
qCDebug(ipcLog) << "<<< AliveMessage"; qCDebugIpc() << "AliveMessage";
QTC_ASSERT(m_aliveHandler, return); QTC_ASSERT(m_aliveHandler, return);
m_aliveHandler(); m_aliveHandler();
} }
void BackendReceiver::echo(const EchoMessage &message) void BackendReceiver::echo(const EchoMessage &message)
{ {
qCDebug(ipcLog) << "<<<" << message; qCDebugIpc() << message;
} }
void BackendReceiver::codeCompleted(const CodeCompletedMessage &message) void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
{ {
qCDebug(ipcLog) << "<<< CodeCompletedMessage with" << message.codeCompletions().size() qCDebugIpc() << "CodeCompletedMessage with" << message.codeCompletions().size()
<< "items"; << "items";
const quint64 ticket = message.ticketNumber(); const quint64 ticket = message.ticketNumber();
QScopedPointer<ClangCompletionAssistProcessor> processor(m_assistProcessorsTable.take(ticket)); QScopedPointer<ClangCompletionAssistProcessor> processor(m_assistProcessorsTable.take(ticket));
...@@ -178,10 +180,10 @@ void BackendReceiver::codeCompleted(const CodeCompletedMessage &message) ...@@ -178,10 +180,10 @@ void BackendReceiver::codeCompleted(const CodeCompletedMessage &message)
void BackendReceiver::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message) void BackendReceiver::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message)
{ {
qCDebug(ipcLog) << "<<< DocumentAnnotationsChangedMessage with" qCDebugIpc() << "DocumentAnnotationsChangedMessage with"
<< message.diagnostics().size() << "diagnostics" << message.diagnostics().size() << "diagnostics"
<< message.tokenInfos().size() << "highlighting marks" << message.tokenInfos().size() << "highlighting marks"
<< message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges"; << message.skippedPreprocessorRanges().size() << "skipped preprocessor ranges";
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer().filePath()); auto processor = ClangEditorDocumentProcessor::get(message.fileContainer().filePath());
...@@ -254,8 +256,8 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message) ...@@ -254,8 +256,8 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message)
void BackendReceiver::references(const ReferencesMessage &message) void BackendReceiver::references(const ReferencesMessage &message)
{ {
qCDebug(ipcLog) << "<<< ReferencesMessage with" qCDebugIpc() << "ReferencesMessage with"
<< message.references().size() << "references"; << message.references().size() << "references";
const quint64 ticket = message.ticketNumber(); const quint64 ticket = message.ticketNumber();
const ReferencesEntry entry = m_referencesTable.take(ticket); const ReferencesEntry entry = m_referencesTable.take(ticket);
...@@ -272,8 +274,8 @@ void BackendReceiver::references(const ReferencesMessage &message) ...@@ -272,8 +274,8 @@ void BackendReceiver::references(const ReferencesMessage &message)
void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message) void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message)
{ {
qCDebug(ipcLog) << "<<< FollowSymbolMessage with" qCDebugIpc() << "FollowSymbolMessage with"
<< message.sourceRange() << "range"; << message.sourceRange() << "range";
const quint64 ticket = message.ticketNumber(); const quint64 ticket = message.ticketNumber();
QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket); QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket);
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#define qCDebugIpc() qCDebug(ipcLog) << "====>"
using namespace ClangBackEnd; using namespace ClangBackEnd;
namespace ClangCodeModel { namespace ClangCodeModel {
...@@ -44,91 +46,91 @@ BackendSender::BackendSender(ClangCodeModelConnectionClient *connectionClient) ...@@ -44,91 +46,91 @@ BackendSender::BackendSender(ClangCodeModelConnectionClient *connectionClient)
void BackendSender::end() void BackendSender::end()
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << ClangBackEnd::EndMessage(); qCDebugIpc() << ClangBackEnd::EndMessage();
m_connection->sendEndMessage(); m_connection->sendEndMessage();
} }
void BackendSender::registerTranslationUnitsForEditor(const RegisterTranslationUnitForEditorMessage &message) void BackendSender::registerTranslationUnitsForEditor(const RegisterTranslationUnitForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().registerTranslationUnitsForEditor(message); m_connection->serverProxy().registerTranslationUnitsForEditor(message);
} }
void BackendSender::updateTranslationUnitsForEditor(const UpdateTranslationUnitsForEditorMessage &message) void BackendSender::updateTranslationUnitsForEditor(const UpdateTranslationUnitsForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().updateTranslationUnitsForEditor(message); m_connection->serverProxy().updateTranslationUnitsForEditor(message);
} }
void BackendSender::unregisterTranslationUnitsForEditor(const UnregisterTranslationUnitsForEditorMessage &message) void BackendSender::unregisterTranslationUnitsForEditor(const UnregisterTranslationUnitsForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().unregisterTranslationUnitsForEditor(message); m_connection->serverProxy().unregisterTranslationUnitsForEditor(message);
} }
void BackendSender::registerProjectPartsForEditor(const RegisterProjectPartsForEditorMessage &message) void BackendSender::registerProjectPartsForEditor(const RegisterProjectPartsForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().registerProjectPartsForEditor(message); m_connection->serverProxy().registerProjectPartsForEditor(message);
} }
void BackendSender::unregisterProjectPartsForEditor(const UnregisterProjectPartsForEditorMessage &message) void BackendSender::unregisterProjectPartsForEditor(const UnregisterProjectPartsForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().unregisterProjectPartsForEditor(message); m_connection->serverProxy().unregisterProjectPartsForEditor(message);
} }
void BackendSender::registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message) void BackendSender::registerUnsavedFilesForEditor(const RegisterUnsavedFilesForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().registerUnsavedFilesForEditor(message); m_connection->serverProxy().registerUnsavedFilesForEditor(message);
} }
void BackendSender::unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message) void BackendSender::unregisterUnsavedFilesForEditor(const UnregisterUnsavedFilesForEditorMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().unregisterUnsavedFilesForEditor(message); m_connection->serverProxy().unregisterUnsavedFilesForEditor(message);
} }
void BackendSender::completeCode(const CompleteCodeMessage &message) void BackendSender::completeCode(const CompleteCodeMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().completeCode(message); m_connection->serverProxy().completeCode(message);
} }
void BackendSender::requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message) void BackendSender::requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().requestDocumentAnnotations(message); m_connection->serverProxy().requestDocumentAnnotations(message);
} }
void BackendSender::requestReferences(const RequestReferencesMessage &message) void BackendSender::requestReferences(const RequestReferencesMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().requestReferences(message); m_connection->serverProxy().requestReferences(message);
} }
void BackendSender::requestFollowSymbol(const RequestFollowSymbolMessage &message) void BackendSender::requestFollowSymbol(const RequestFollowSymbolMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().requestFollowSymbol(message); m_connection->serverProxy().requestFollowSymbol(message);
} }
void BackendSender::updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message) void BackendSender::updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &message)
{ {
QTC_CHECK(m_connection->isConnected()); QTC_CHECK(m_connection->isConnected());
qCDebug(ipcLog) << ">>>" << message; qCDebugIpc() << message;
m_connection->serverProxy().updateVisibleTranslationUnits(message); m_connection->serverProxy().updateVisibleTranslationUnits(message);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment