summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_logging.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/ipc_logging.cc')
-rw-r--r--ipc/ipc_logging.cc14
1 files changed, 10 insertions, 4 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
}