Commit e827d0d1 authored by rch@chromium.org's avatar rch@chromium.org

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
parent d5cb0120
...@@ -26,6 +26,11 @@ std::string FLAGS_hostname = "localhost"; ...@@ -26,6 +26,11 @@ std::string FLAGS_hostname = "localhost";
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
CommandLine::Init(argc, argv); CommandLine::Init(argc, argv);
CommandLine* line = CommandLine::ForCurrentProcess(); 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")) { if (line->HasSwitch("h") || line->HasSwitch("help")) {
const char* help_str = const char* help_str =
"Usage: quic_client [options]\n" "Usage: quic_client [options]\n"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/at_exit.h" #include "base/at_exit.h"
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "net/base/ip_endpoint.h" #include "net/base/ip_endpoint.h"
#include "net/tools/quic/quic_in_memory_cache.h" #include "net/tools/quic/quic_in_memory_cache.h"
...@@ -22,6 +23,11 @@ int32 FLAGS_port = 6121; ...@@ -22,6 +23,11 @@ int32 FLAGS_port = 6121;
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
CommandLine::Init(argc, argv); CommandLine::Init(argc, argv);
CommandLine* line = CommandLine::ForCurrentProcess(); 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")) { if (line->HasSwitch("h") || line->HasSwitch("help")) {
const char* help_str = const char* help_str =
"Usage: quic_server [options]\n" "Usage: quic_server [options]\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment