Index: net/tools/flip_server/flip_in_mem_edsm_server.cc |
diff --git a/net/tools/flip_server/flip_in_mem_edsm_server.cc b/net/tools/flip_server/flip_in_mem_edsm_server.cc |
index 15fb9644a8cbc4fec60ed2d70364ff220ef4553a..e6c32aa02b7e8633e3f3c932117f9e254a77ca33 100644 |
--- a/net/tools/flip_server/flip_in_mem_edsm_server.cc |
+++ b/net/tools/flip_server/flip_in_mem_edsm_server.cc |
@@ -227,12 +227,11 @@ int main (int argc, char**argv) |
if (cl.HasSwitch("logdest")) { |
std::string log_dest_value = cl.GetSwitchValueASCII("logdest"); |
if (log_dest_value.compare("file") == 0) { |
- g_proxy_config.log_destination_ = logging::LOG_ONLY_TO_FILE; |
+ g_proxy_config.log_destination_ = logging::LOG_TO_FILE; |
} else if (log_dest_value.compare("system") == 0) { |
- g_proxy_config.log_destination_ = logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG; |
+ g_proxy_config.log_destination_ = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
} else if (log_dest_value.compare("both") == 0) { |
- g_proxy_config.log_destination_ = |
- logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG; |
+ g_proxy_config.log_destination_ = logging::LOG_TO_ALL; |
} else { |
LOG(FATAL) << "Invalid logging destination value: " << log_dest_value; |
} |
@@ -243,11 +242,9 @@ int main (int argc, char**argv) |
if (cl.HasSwitch("logfile")) { |
g_proxy_config.log_filename_ = cl.GetSwitchValueASCII("logfile"); |
if (g_proxy_config.log_destination_ == logging::LOG_NONE) { |
- g_proxy_config.log_destination_ = logging::LOG_ONLY_TO_FILE; |
+ g_proxy_config.log_destination_ = logging::LOG_TO_FILE; |
} |
- } else if (g_proxy_config.log_destination_ == logging::LOG_ONLY_TO_FILE || |
- g_proxy_config.log_destination_ == |
- logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG) { |
+ } else if ((g_proxy_config.log_destination_ & logging::LOG_TO_FILE) != 0) { |
LOG(FATAL) << "Logging destination requires a log file to be specified."; |
} |
@@ -272,11 +269,11 @@ int main (int argc, char**argv) |
if (cl.HasSwitch("force_spdy")) |
net::SMConnection::set_force_spdy(true); |
- InitLogging(g_proxy_config.log_filename_.c_str(), |
- g_proxy_config.log_destination_, |
- logging::DONT_LOCK_LOG_FILE, |
- logging::APPEND_TO_OLD_LOG_FILE, |
- logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
+ logging::LoggingSettings settings; |
+ settings.logging_dest = g_proxy_config.log_destination_; |
+ settings.log_file = g_proxy_config.log_filename_.c_str(); |
+ settings.lock_log = logging::DONT_LOCK_LOG_FILE; |
+ logging::InitLogging(settings); |
LOG(INFO) << "Flip SPDY proxy started with configuration:"; |
LOG(INFO) << "Logging destination : " << g_proxy_config.log_destination_; |