diff options
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 |