Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: ipc/ipc_logging.cc

Issue 159511: posix: cut down on IPC logging spew a bit (Closed)
Patch Set: more Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_logging.cc
diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc
index 4ecb7d9a91e01e408483878d6ef3344a78ddf348..9d4f4bbd94a2ad91c5450088ac76e797d963a98b 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
}
« no previous file with comments | « no previous file | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698