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

Unified Diff: src/log-utils.cc

Issue 12093008: log: add %p option to --logfile, expands to pid (Closed)
Patch Set: Created 7 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-utils.cc
diff --git a/src/log-utils.cc b/src/log-utils.cc
index d8d92cbe211607f03e2a6f131f6f2f481b47f023..a66db3d931e9fe5d99edfba39b81ec8418099a89 100644
--- a/src/log-utils.cc
+++ b/src/log-utils.cc
@@ -107,6 +107,9 @@ void Log::Initialize() {
// one character so we can escape the loop properly.
p--;
break;
+ case 'p':
+ stream.Add("%d", OS::GetCurrentProcessId());
+ break;
case 't': {
// %t expands to the current time in milliseconds.
double time = OS::TimeCurrentMillis();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698