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

Silence INFO logging in net/tools/quic/ and use VLOG(1) instead.

BUG=334690

Review URL: https://codereview.chromium.org/137253006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245099 0039d316-1c4b-4281-b951-d872f2087c98
parent 0ab47a7b
...@@ -159,7 +159,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> { ...@@ -159,7 +159,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
server_supported_versions_ = GetParam().server_supported_versions; server_supported_versions_ = GetParam().server_supported_versions;
negotiated_version_ = GetParam().negotiated_version; negotiated_version_ = GetParam().negotiated_version;
FLAGS_enable_quic_pacing = GetParam().use_pacing; FLAGS_enable_quic_pacing = GetParam().use_pacing;
LOG(INFO) << "Using Configuration: " << GetParam(); VLOG(1) << "Using Configuration: " << GetParam();
client_config_.SetDefaults(); client_config_.SetDefaults();
server_config_.SetDefaults(); server_config_.SetDefaults();
......
...@@ -242,7 +242,7 @@ void QuicClient::OnEvent(int fd, EpollEvent* event) { ...@@ -242,7 +242,7 @@ void QuicClient::OnEvent(int fd, EpollEvent* event) {
session_->connection()->OnCanWrite(); session_->connection()->OnCanWrite();
} }
if (event->in_events & EPOLLERR) { if (event->in_events & EPOLLERR) {
DLOG(INFO) << "Epollerr"; DVLOG(1) << "Epollerr";
} }
} }
......
...@@ -50,9 +50,9 @@ int main(int argc, char *argv[]) { ...@@ -50,9 +50,9 @@ int main(int argc, char *argv[]) {
if (line->HasSwitch("hostname")) { if (line->HasSwitch("hostname")) {
FLAGS_hostname = line->GetSwitchValueASCII("hostname"); FLAGS_hostname = line->GetSwitchValueASCII("hostname");
} }
LOG(INFO) << "server port: " << FLAGS_port VLOG(1) << "server port: " << FLAGS_port
<< " address: " << FLAGS_address << " address: " << FLAGS_address
<< " hostname: " << FLAGS_hostname; << " hostname: " << FLAGS_hostname;
base::AtExitManager exit_manager; base::AtExitManager exit_manager;
......
...@@ -27,17 +27,17 @@ QuicClientSession::~QuicClientSession() { ...@@ -27,17 +27,17 @@ QuicClientSession::~QuicClientSession() {
QuicSpdyClientStream* QuicClientSession::CreateOutgoingDataStream() { QuicSpdyClientStream* QuicClientSession::CreateOutgoingDataStream() {
if (!crypto_stream_.encryption_established()) { if (!crypto_stream_.encryption_established()) {
DLOG(INFO) << "Encryption not active so no outgoing stream created."; DVLOG(1) << "Encryption not active so no outgoing stream created.";
return NULL; return NULL;
} }
if (GetNumOpenStreams() >= get_max_open_streams()) { if (GetNumOpenStreams() >= get_max_open_streams()) {
DLOG(INFO) << "Failed to create a new outgoing stream. " DVLOG(1) << "Failed to create a new outgoing stream. "
<< "Already " << GetNumOpenStreams() << " open."; << "Already " << GetNumOpenStreams() << " open.";
return NULL; return NULL;
} }
if (goaway_received()) { if (goaway_received()) {
DLOG(INFO) << "Failed to create a new outgoing stream. " DVLOG(1) << "Failed to create a new outgoing stream. "
<< "Already received goaway."; << "Already received goaway.";
return NULL; return NULL;
} }
QuicSpdyClientStream* stream QuicSpdyClientStream* stream
......
...@@ -54,7 +54,7 @@ class QuicDispatcher::QuicFramerVisitor : public QuicFramerVisitorInterface { ...@@ -54,7 +54,7 @@ class QuicDispatcher::QuicFramerVisitor : public QuicFramerVisitorInterface {
return false; return false;
} }
virtual void OnError(QuicFramer* framer) OVERRIDE { virtual void OnError(QuicFramer* framer) OVERRIDE {
DLOG(INFO) << QuicUtils::ErrorToString(framer->error()); DVLOG(1) << QuicUtils::ErrorToString(framer->error());
} }
// The following methods should never get called because we always return // The following methods should never get called because we always return
...@@ -220,7 +220,7 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader( ...@@ -220,7 +220,7 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader(
} }
if (session == NULL) { if (session == NULL) {
DLOG(INFO) << "Failed to create session for " << guid; DVLOG(1) << "Failed to create session for " << guid;
// Add this guid fo the time-wait state, to safely reject future packets. // Add this guid fo the time-wait state, to safely reject future packets.
if (header.version_flag && if (header.version_flag &&
...@@ -236,7 +236,7 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader( ...@@ -236,7 +236,7 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader(
DCHECK(time_wait_list_manager_->IsGuidInTimeWait(guid)); DCHECK(time_wait_list_manager_->IsGuidInTimeWait(guid));
return HandlePacketForTimeWait(header); return HandlePacketForTimeWait(header);
} }
DLOG(INFO) << "Created new session for " << guid; DVLOG(1) << "Created new session for " << guid;
session_map_.insert(make_pair(guid, session)); session_map_.insert(make_pair(guid, session));
} else { } else {
session = it->second; session = it->second;
......
...@@ -99,7 +99,7 @@ void QuicInMemoryCache::AddSimpleResponse(StringPiece method, ...@@ -99,7 +99,7 @@ void QuicInMemoryCache::AddSimpleResponse(StringPiece method,
void QuicInMemoryCache::AddResponse(const BalsaHeaders& request_headers, void QuicInMemoryCache::AddResponse(const BalsaHeaders& request_headers,
const BalsaHeaders& response_headers, const BalsaHeaders& response_headers,
StringPiece response_body) { StringPiece response_body) {
LOG(INFO) << "Adding response for: " << GetKey(request_headers); VLOG(1) << "Adding response for: " << GetKey(request_headers);
if (ContainsKey(responses_, GetKey(request_headers))) { if (ContainsKey(responses_, GetKey(request_headers))) {
LOG(DFATAL) << "Response for given request already exists!"; LOG(DFATAL) << "Response for given request already exists!";
return; return;
...@@ -122,11 +122,11 @@ void QuicInMemoryCache::ResetForTests() { ...@@ -122,11 +122,11 @@ void QuicInMemoryCache::ResetForTests() {
void QuicInMemoryCache::Initialize() { void QuicInMemoryCache::Initialize() {
// If there's no defined cache dir, we have no initialization to do. // If there's no defined cache dir, we have no initialization to do.
if (FLAGS_quic_in_memory_cache_dir.empty()) { if (FLAGS_quic_in_memory_cache_dir.empty()) {
LOG(WARNING) << "No cache directory found. Skipping initialization."; VLOG(1) << "No cache directory found. Skipping initialization.";
return; return;
} }
LOG(INFO) << "Attempting to initialize QuicInMemoryCache from directory: " VLOG(1) << "Attempting to initialize QuicInMemoryCache from directory: "
<< FLAGS_quic_in_memory_cache_dir; << FLAGS_quic_in_memory_cache_dir;
FilePath directory(FLAGS_quic_in_memory_cache_dir); FilePath directory(FLAGS_quic_in_memory_cache_dir);
base::FileEnumerator file_list(directory, base::FileEnumerator file_list(directory,
...@@ -199,8 +199,8 @@ void QuicInMemoryCache::Initialize() { ...@@ -199,8 +199,8 @@ void QuicInMemoryCache::Initialize() {
"HTTP/1.1"); "HTTP/1.1");
request_headers.ReplaceOrAppendHeader("host", host); request_headers.ReplaceOrAppendHeader("host", host);
LOG(INFO) << "Inserting 'http://" << GetKey(request_headers) VLOG(1) << "Inserting 'http://" << GetKey(request_headers)
<< "' into QuicInMemoryCache."; << "' into QuicInMemoryCache.";
AddResponse(request_headers, response_headers, caching_visitor.body()); AddResponse(request_headers, response_headers, caching_visitor.body());
......
...@@ -133,7 +133,7 @@ bool QuicServer::Listen(const IPEndPoint& address) { ...@@ -133,7 +133,7 @@ bool QuicServer::Listen(const IPEndPoint& address) {
return false; return false;
} }
LOG(INFO) << "Listening on " << address.ToString(); DVLOG(1) << "Listening on " << address.ToString();
if (port_ == 0) { if (port_ == 0) {
SockaddrStorage storage; SockaddrStorage storage;
IPEndPoint server_address; IPEndPoint server_address;
...@@ -143,7 +143,7 @@ bool QuicServer::Listen(const IPEndPoint& address) { ...@@ -143,7 +143,7 @@ bool QuicServer::Listen(const IPEndPoint& address) {
return false; return false;
} }
port_ = server_address.port(); port_ = server_address.port();
LOG(INFO) << "Kernel assigned port is " << port_; DVLOG(1) << "Kernel assigned port is " << port_;
} }
epoll_server_.RegisterFD(fd_, this, kEpollFlags); epoll_server_.RegisterFD(fd_, this, kEpollFlags);
...@@ -172,7 +172,7 @@ void QuicServer::OnEvent(int fd, EpollEvent* event) { ...@@ -172,7 +172,7 @@ void QuicServer::OnEvent(int fd, EpollEvent* event) {
event->out_ready_mask = 0; event->out_ready_mask = 0;
if (event->in_events & EPOLLIN) { if (event->in_events & EPOLLIN) {
LOG(ERROR) << "EPOLLIN"; DVLOG(1) << "EPOLLIN";
bool read = true; bool read = true;
while (read) { while (read) {
read = ReadAndDispatchSinglePacket( read = ReadAndDispatchSinglePacket(
......
...@@ -41,13 +41,13 @@ void QuicServerSession::OnConnectionClosed(QuicErrorCode error, ...@@ -41,13 +41,13 @@ void QuicServerSession::OnConnectionClosed(QuicErrorCode error,
bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) { bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) {
if (id % 2 == 0) { if (id % 2 == 0) {
DLOG(INFO) << "Invalid incoming even stream_id:" << id; DVLOG(1) << "Invalid incoming even stream_id:" << id;
connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID); connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID);
return false; return false;
} }
if (GetNumOpenStreams() >= get_max_open_streams()) { if (GetNumOpenStreams() >= get_max_open_streams()) {
DLOG(INFO) << "Failed to create a new incoming stream with id:" << id DVLOG(1) << "Failed to create a new incoming stream with id:" << id
<< " Already " << GetNumOpenStreams() << " open."; << " Already " << GetNumOpenStreams() << " open.";
connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS); connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS);
return false; return false;
} }
......
...@@ -30,8 +30,8 @@ QuicSpdyClientStream::~QuicSpdyClientStream() { ...@@ -30,8 +30,8 @@ QuicSpdyClientStream::~QuicSpdyClientStream() {
bool QuicSpdyClientStream::OnStreamFrame(const QuicStreamFrame& frame) { bool QuicSpdyClientStream::OnStreamFrame(const QuicStreamFrame& frame) {
if (!write_side_closed()) { if (!write_side_closed()) {
DLOG(INFO) << "Got a response before the request was complete. " DVLOG(1) << "Got a response before the request was complete. "
<< "Aborting request."; << "Aborting request.";
CloseWriteSide(); CloseWriteSide();
} }
return QuicDataStream::OnStreamFrame(frame); return QuicDataStream::OnStreamFrame(frame);
......
...@@ -97,12 +97,12 @@ void QuicSpdyServerStream::SendResponse() { ...@@ -97,12 +97,12 @@ void QuicSpdyServerStream::SendResponse() {
return; return;
} }
DLOG(INFO) << "Sending response for stream " << id(); DVLOG(1) << "Sending response for stream " << id();
SendHeadersAndBody(response->headers(), response->body()); SendHeadersAndBody(response->headers(), response->body());
} }
void QuicSpdyServerStream::SendErrorResponse() { void QuicSpdyServerStream::SendErrorResponse() {
DLOG(INFO) << "Sending error response for stream " << id(); DVLOG(1) << "Sending error response for stream " << id();
BalsaHeaders headers; BalsaHeaders headers;
headers.SetResponseFirstlineFromStringPieces( headers.SetResponseFirstlineFromStringPieces(
"HTTP/1.1", "500", "Server Error"); "HTTP/1.1", "500", "Server Error");
......
...@@ -38,8 +38,8 @@ void PopulateSpdyHeaderBlock(const BalsaHeaders& headers, ...@@ -38,8 +38,8 @@ void PopulateSpdyHeaderBlock(const BalsaHeaders& headers,
hi != headers.header_lines_end(); hi != headers.header_lines_end();
++hi) { ++hi) {
if ((hi->second.length() == 0) && !allow_empty_values) { if ((hi->second.length() == 0) && !allow_empty_values) {
DLOG(INFO) << "Dropping empty header " << hi->first.as_string() DVLOG(1) << "Dropping empty header " << hi->first.as_string()
<< " from headers"; << " from headers";
continue; continue;
} }
......
...@@ -60,7 +60,7 @@ PacketDroppingTestWriter::PacketDroppingTestWriter() ...@@ -60,7 +60,7 @@ PacketDroppingTestWriter::PacketDroppingTestWriter()
fake_bandwidth_(QuicBandwidth::Zero()), fake_bandwidth_(QuicBandwidth::Zero()),
buffer_size_(0) { buffer_size_(0) {
uint32 seed = base::RandInt(0, std::numeric_limits<int32>::max()); uint32 seed = base::RandInt(0, std::numeric_limits<int32>::max());
LOG(INFO) << "Seeding packet loss with " << seed; VLOG(1) << "Seeding packet loss with " << seed;
simple_random_.set_seed(seed); simple_random_.set_seed(seed);
} }
...@@ -86,13 +86,13 @@ WriteResult PacketDroppingTestWriter::WritePacket( ...@@ -86,13 +86,13 @@ WriteResult PacketDroppingTestWriter::WritePacket(
if (fake_packet_loss_percentage_ > 0 && if (fake_packet_loss_percentage_ > 0 &&
simple_random_.RandUint64() % 100 < simple_random_.RandUint64() % 100 <
static_cast<uint64>(fake_packet_loss_percentage_)) { static_cast<uint64>(fake_packet_loss_percentage_)) {
DLOG(INFO) << "Dropping packet."; DVLOG(1) << "Dropping packet.";
return WriteResult(WRITE_STATUS_OK, buf_len); return WriteResult(WRITE_STATUS_OK, buf_len);
} }
if (fake_blocked_socket_percentage_ > 0 && if (fake_blocked_socket_percentage_ > 0 &&
simple_random_.RandUint64() % 100 < simple_random_.RandUint64() % 100 <
static_cast<uint64>(fake_blocked_socket_percentage_)) { static_cast<uint64>(fake_blocked_socket_percentage_)) {
DLOG(INFO) << "Blocking socket."; DVLOG(1) << "Blocking socket.";
if (!write_unblocked_alarm_->IsSet()) { if (!write_unblocked_alarm_->IsSet()) {
blocked_writer_ = blocked_writer; blocked_writer_ = blocked_writer;
// Set the alarm for 1ms in the future. // Set the alarm for 1ms in the future.
...@@ -106,7 +106,7 @@ WriteResult PacketDroppingTestWriter::WritePacket( ...@@ -106,7 +106,7 @@ WriteResult PacketDroppingTestWriter::WritePacket(
if (!fake_packet_delay_.IsZero() || !fake_bandwidth_.IsZero()) { if (!fake_packet_delay_.IsZero() || !fake_bandwidth_.IsZero()) {
if (buffer_size_ > 0 && buf_len + cur_buffer_size_ > buffer_size_) { if (buffer_size_ > 0 && buf_len + cur_buffer_size_ > buffer_size_) {
// Drop packets which do not fit into the buffer. // Drop packets which do not fit into the buffer.
DLOG(INFO) << "Dropping packet because the buffer is full."; DVLOG(1) << "Dropping packet because the buffer is full.";
return WriteResult(WRITE_STATUS_OK, buf_len); return WriteResult(WRITE_STATUS_OK, buf_len);
} }
...@@ -151,14 +151,14 @@ QuicTime PacketDroppingTestWriter::ReleaseNextPacket() { ...@@ -151,14 +151,14 @@ QuicTime PacketDroppingTestWriter::ReleaseNextPacket() {
if (delayed_packets_.size() > 1 && fake_packet_reorder_percentage_ > 0 && if (delayed_packets_.size() > 1 && fake_packet_reorder_percentage_ > 0 &&
simple_random_.RandUint64() % 100 < simple_random_.RandUint64() % 100 <
static_cast<uint64>(fake_packet_reorder_percentage_)) { static_cast<uint64>(fake_packet_reorder_percentage_)) {
DLOG(INFO) << "Reordering packets."; DVLOG(1) << "Reordering packets.";
++iter; ++iter;
// Swap the send times when re-ordering packets. // Swap the send times when re-ordering packets.
delayed_packets_.begin()->send_time = iter->send_time; delayed_packets_.begin()->send_time = iter->send_time;
} }
DLOG(INFO) << "Releasing packet. " << (delayed_packets_.size() - 1) DVLOG(1) << "Releasing packet. " << (delayed_packets_.size() - 1)
<< " remaining."; << " remaining.";
// Grab the next one off the queue and send it. // Grab the next one off the queue and send it.
writer()->WritePacket(iter->buffer.data(), iter->buffer.length(), writer()->WritePacket(iter->buffer.data(), iter->buffer.length(),
iter->self_address, iter->peer_address, NULL); iter->self_address, iter->peer_address, NULL);
......
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