diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2016-12-28 09:08:07 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-01-06 20:13:12 +0100 |
commit | 6d3c5b78c843335c822041aa07487078fc13e61f (patch) | |
tree | 1a65337d0453bd716a8921ba71146b865ba2ee4a /src/inspector_socket_server.h | |
parent | e5499b32cfcde144ee41500356d45d990cd9df0e (diff) | |
download | android-node-v8-6d3c5b78c843335c822041aa07487078fc13e61f.tar.gz android-node-v8-6d3c5b78c843335c822041aa07487078fc13e61f.tar.bz2 android-node-v8-6d3c5b78c843335c822041aa07487078fc13e61f.zip |
src: reduce test_inspector_socket_server output
Currently, when test/cctest/test_inspector_socket_server.cc is run there
is output written to stderr by src/inspector_socket_server.cc which is
interleaved with the gtest report:
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URLs in Chrome:
...
The goal of this commit is to remove the above logged information
by introducing an out_ member in the InspectorSocketServer class
which defaults to stderr (keeping the current behavior).
Setting out_ to NULL is supported in which case nothing will be written
and is what the test has been configured with. When working on specific
test case the appropriate output stream can be specified for the
ServerHolder constructor to limit logging to that test case.
PR-URL: https://github.com/nodejs/node/pull/10537
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/inspector_socket_server.h')
-rw-r--r-- | src/inspector_socket_server.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inspector_socket_server.h b/src/inspector_socket_server.h index 4c139e138f..d498c882a9 100644 --- a/src/inspector_socket_server.h +++ b/src/inspector_socket_server.h @@ -32,7 +32,9 @@ class SocketServerDelegate { class InspectorSocketServer { public: using ServerCallback = void (*)(InspectorSocketServer*); - InspectorSocketServer(SocketServerDelegate* delegate, int port); + InspectorSocketServer(SocketServerDelegate* delegate, + int port, + FILE* out = stderr); bool Start(uv_loop_t* loop); void Stop(ServerCallback callback); void Send(int session_id, const std::string& message); @@ -66,6 +68,7 @@ class InspectorSocketServer { Closer* closer_; std::map<int, SocketSession*> connected_sessions_; int next_session_id_; + FILE* out_; friend class SocketSession; friend class Closer; |