diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-19 00:49:53 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-19 00:49:53 +0000 |
commit | e827d0d1f2906702fdb6d419e80ad6cfb2cf1ae5 (patch) | |
tree | 89dfaa3b3979be9f994ce542d0fa05a69018cddf /net | |
parent | d5cb0120051269cfed062fea95e4819d381557ef (diff) | |
download | chromium_src-e827d0d1f2906702fdb6d419e80ad6cfb2cf1ae5.zip chromium_src-e827d0d1f2906702fdb6d419e80ad6cfb2cf1ae5.tar.gz chromium_src-e827d0d1f2906702fdb6d419e80ad6cfb2cf1ae5.tar.bz2 |
Properly initialize logging in quic_server and quic_client so
that --v=1 is functional.
Review URL: https://codereview.chromium.org/170743003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/tools/quic/quic_client_bin.cc | 5 | ||||
-rw-r--r-- | net/tools/quic/quic_server_bin.cc | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc index aaacfbb..49cfdef 100644 --- a/net/tools/quic/quic_client_bin.cc +++ b/net/tools/quic/quic_client_bin.cc @@ -26,6 +26,11 @@ std::string FLAGS_hostname = "localhost"; int main(int argc, char *argv[]) { CommandLine::Init(argc, argv); CommandLine* line = CommandLine::ForCurrentProcess(); + + logging::LoggingSettings settings; + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; + CHECK(logging::InitLogging(settings)); + if (line->HasSwitch("h") || line->HasSwitch("help")) { const char* help_str = "Usage: quic_client [options]\n" diff --git a/net/tools/quic/quic_server_bin.cc b/net/tools/quic/quic_server_bin.cc index a71cbcf..e4113d0 100644 --- a/net/tools/quic/quic_server_bin.cc +++ b/net/tools/quic/quic_server_bin.cc @@ -10,6 +10,7 @@ #include "base/at_exit.h" #include "base/basictypes.h" #include "base/command_line.h" +#include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "net/base/ip_endpoint.h" #include "net/tools/quic/quic_in_memory_cache.h" @@ -22,6 +23,11 @@ int32 FLAGS_port = 6121; int main(int argc, char *argv[]) { CommandLine::Init(argc, argv); CommandLine* line = CommandLine::ForCurrentProcess(); + + logging::LoggingSettings settings; + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; + CHECK(logging::InitLogging(settings)); + if (line->HasSwitch("h") || line->HasSwitch("help")) { const char* help_str = "Usage: quic_server [options]\n" |