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