diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-12-17 23:35:18 +0100 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2013-12-18 15:36:12 -0800 |
commit | 2eaef9f6daf996d5ea8fb4dcf3443724da5f7662 (patch) | |
tree | 08950232504e0c45720f57570215996f8ee2cedd | |
parent | 32478acf94ee3a787a65407b9f201bbb45405f3e (diff) | |
download | node-2eaef9f6daf996d5ea8fb4dcf3443724da5f7662.tar.gz |
cluster, v8: fix --logfile=%p.log
The %p is replaced with the current PID. This used to work in node.js
v0.9.7 but it seems to have been lost somewhere along the way.
This commit makes the fix from 6b713b52 ("cluster: make --prof work for
workers") work again. Without it, all log data ends up in a single
file and is unusable because the addresses are all wrong.
-rw-r--r-- | deps/v8/src/log-utils.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/v8/src/log-utils.cc b/deps/v8/src/log-utils.cc index 7bd7baa2d..5e607daa9 100644 --- a/deps/v8/src/log-utils.cc +++ b/deps/v8/src/log-utils.cc @@ -105,6 +105,10 @@ void Log::Initialize() { // one character so we can escape the loop properly. p--; break; + case 'p': + // %p expands to the process ID. + stream.Add("%d", OS::GetCurrentProcessId()); + break; case 't': { // %t expands to the current time in milliseconds. double time = OS::TimeCurrentMillis(); |