diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 17:04:37 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 17:04:37 +0000 |
commit | 35e5dc1df39fb6ab74cccec5a25625e3b2b9af89 (patch) | |
tree | 5724fac384440fd2fea74466792287cec1f2ee4d /ipc | |
parent | 29712f67cc49a15b91e24d87ab1bd5928e0ea3b5 (diff) | |
download | chromium_src-35e5dc1df39fb6ab74cccec5a25625e3b2b9af89.zip chromium_src-35e5dc1df39fb6ab74cccec5a25625e3b2b9af89.tar.gz chromium_src-35e5dc1df39fb6ab74cccec5a25625e3b2b9af89.tar.bz2 |
posix: cut down on IPC logging spew a bit
We don't need to show the message type if we know the message name.
Review URL: http://codereview.chromium.org/159511
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_logging.cc | 14 | ||||
-rw-r--r-- | ipc/ipc_message_utils.h | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc index 4ecb7d9..9d4f4bb 100644 --- a/ipc/ipc_logging.cc +++ b/ipc/ipc_logging.cc @@ -254,13 +254,19 @@ void Logging::Log(const LogData& data) { } } #elif defined(OS_POSIX) + std::string message_name; + if (data.message_name.empty()) { + message_name = StringPrintf("[unknown type %d]", data.type); + } else { + message_name = WideToASCII(data.message_name); + } + // On POSIX, for now, we just dump the log to stderr - fprintf(stderr, "ipc %s %d %d %s %s %s\n", + fprintf(stderr, "ipc %s %d %s %s %s\n", data.channel.c_str(), data.routing_id, - data.type, - WideToUTF8(data.flags).c_str(), - WideToUTF8(data.message_name).c_str(), + WideToASCII(data.flags).c_str(), + message_name.c_str(), WideToUTF8(data.params).c_str()); #endif } diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h index 523ce60..4e25b85 100644 --- a/ipc/ipc_message_utils.h +++ b/ipc/ipc_message_utils.h @@ -753,7 +753,7 @@ struct ParamTraits<XFORM> { struct LogData { std::string channel; int32 routing_id; - uint16 type; + uint16 type; // "User-defined" message type, from ipc_message.h. std::wstring flags; int64 sent; // Time that the message was sent (i.e. at Send()). int64 receive; // Time before it was dispatched (i.e. before calling |