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

Unified Diff: runtime/bin/process_android.cc

Issue 11312242: Revised CL for customisable logging (replacing printfs). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
Index: runtime/bin/process_android.cc
===================================================================
--- runtime/bin/process_android.cc (revision 14903)
+++ runtime/bin/process_android.cc (working copy)
@@ -15,6 +15,7 @@
#include <unistd.h>
#include "bin/fdutils.h"
+#include "bin/log.h"
#include "bin/thread.h"
@@ -326,16 +327,15 @@
bool initialized = ExitCodeHandler::EnsureInitialized();
if (!initialized) {
SetChildOsErrorMessage(os_error_message, os_error_message_len);
- fprintf(stderr,
- "Error initializing exit code handler: %s\n",
- os_error_message);
+ Log::PrintErr("Error initializing exit code handler: %s\n",
+ os_error_message);
return errno;
}
result = TEMP_FAILURE_RETRY(pipe(read_in));
if (result < 0) {
SetChildOsErrorMessage(os_error_message, os_error_message_len);
- fprintf(stderr, "Error pipe creation failed: %s\n", os_error_message);
+ Log::PrintErr("Error pipe creation failed: %s\n", os_error_message);
return errno;
}
@@ -344,7 +344,7 @@
SetChildOsErrorMessage(os_error_message, os_error_message_len);
TEMP_FAILURE_RETRY(close(read_in[0]));
TEMP_FAILURE_RETRY(close(read_in[1]));
- fprintf(stderr, "Error pipe creation failed: %s\n", os_error_message);
+ Log::PrintErr("Error pipe creation failed: %s\n", os_error_message);
return errno;
}
@@ -355,7 +355,7 @@
TEMP_FAILURE_RETRY(close(read_in[1]));
TEMP_FAILURE_RETRY(close(read_err[0]));
TEMP_FAILURE_RETRY(close(read_err[1]));
- fprintf(stderr, "Error pipe creation failed: %s\n", os_error_message);
+ Log::PrintErr("Error pipe creation failed: %s\n", os_error_message);
return errno;
}
@@ -368,7 +368,7 @@
TEMP_FAILURE_RETRY(close(read_err[1]));
TEMP_FAILURE_RETRY(close(write_out[0]));
TEMP_FAILURE_RETRY(close(write_out[1]));
- fprintf(stderr, "Error pipe creation failed: %s\n", os_error_message);
+ Log::PrintErr("Error pipe creation failed: %s\n", os_error_message);
return errno;
}
@@ -387,7 +387,7 @@
TEMP_FAILURE_RETRY(close(write_out[1]));
TEMP_FAILURE_RETRY(close(exec_control[0]));
TEMP_FAILURE_RETRY(close(exec_control[1]));
- fprintf(stderr, "fcntl failed: %s\n", os_error_message);
+ Log::PrintErr("fcntl failed: %s\n", os_error_message);
return errno;
}
@@ -488,7 +488,7 @@
TEMP_FAILURE_RETRY(close(read_err[1]));
TEMP_FAILURE_RETRY(close(write_out[0]));
TEMP_FAILURE_RETRY(close(write_out[1]));
- fprintf(stderr, "Error pipe creation failed: %s\n", os_error_message);
+ Log::PrintErr("Error pipe creation failed: %s\n", os_error_message);
return errno;
}

Powered by Google App Engine
This is Rietveld 408576698