Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Extra logs are removed
  • Loading branch information
Vjacheslav Murashkin committed Mar 18, 2011
1 parent a1f6cfb commit 3289947
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
22 changes: 10 additions & 12 deletions src/http_socket.cpp
Expand Up @@ -50,7 +50,7 @@ int zmq::http_socket_t::write (const void *data, int size) {
write_buf = (char *)malloc(HTTP_BUF_SIZE);
}

LOGD() << "zmq::http_socket_t::write" << LOG_ENDL();
//LOGD() << "zmq::http_socket_t::write" << LOG_ENDL();

// Init header
if (!write_end) {
Expand All @@ -66,11 +66,10 @@ int zmq::http_socket_t::write (const void *data, int size) {
write_pos = write_buf;
write_end = write_buf + length;

// Logging out header
{
std::string header(write_buf, write_end);
LOGD() << header << LOG_ENDL();
}
//{ // Logging out header
// std::string header(write_buf, write_end);
// LOGD() << header << LOG_ENDL();
//}
}

// Sending HTTP header first
Expand Down Expand Up @@ -99,7 +98,7 @@ int zmq::http_socket_t::read (void *data, int size) {
read_pos = read_buf;
}

LOGD() << "zmq::http_socket_t::read" << LOG_ENDL();
//LOGD() << "zmq::http_socket_t::read" << LOG_ENDL();

int remains = HTTP_BUF_SIZE - (read_pos - read_buf);
int nbytes = tcp_socket_t::read(read_buf, remains);
Expand All @@ -116,11 +115,10 @@ int zmq::http_socket_t::read (void *data, int size) {
it = strstr(it, "\r\n\r\n\r\n");
if (!it) { return 0; }

// Logging out received header
{
std::string header(read_buf, it);
LOGD() << header << LOG_ENDL();
}
//{ // Logging out received header
// std::string header(read_buf, it);
// LOGD() << header << LOG_ENDL();
//}

it += 6; // skipping \r\n

Expand Down
4 changes: 2 additions & 2 deletions src/socket_base.cpp
Expand Up @@ -473,7 +473,7 @@ int zmq::socket_base_t::connect (const char *addr_)
int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_)
{

LOGD() << "zmq::socket_base_t::send" << LOG_ENDL();
//LOGD() << "zmq::socket_base_t::send" << LOG_ENDL();

if (unlikely (ctx_terminated)) {
errno = ETERM;
Expand Down Expand Up @@ -514,7 +514,7 @@ int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_)
int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
{

LOGD() << "zmq::socket_base_t::recv" << LOG_ENDL();
//LOGD() << "zmq::socket_base_t::recv" << LOG_ENDL();

if (unlikely (ctx_terminated)) {
errno = ETERM;
Expand Down
2 changes: 1 addition & 1 deletion src/tcp_connecter.cpp
Expand Up @@ -174,7 +174,7 @@ int zmq::tcp_connecter_t::set_address (const char *protocol_, const char *addr_)

int zmq::tcp_connecter_t::open ()
{
LOGD() << "TCP connection open" << LOG_ENDL();
//LOGD() << "TCP connection open" << LOG_ENDL();

zmq_assert (s == retired_fd);
struct sockaddr *sa = (struct sockaddr*) &addr;
Expand Down
8 changes: 4 additions & 4 deletions src/tcp_socket.cpp
Expand Up @@ -77,7 +77,7 @@ int zmq::tcp_socket_t::write (const void *data, int size)
{
int nbytes = send (s, (char*) data, size, 0);

LOGD() << "TCP bytes sent: " << nbytes << LOG_ENDL();
//LOGD() << "TCP bytes sent: " << nbytes << LOG_ENDL();

// If not a single byte can be written to the socket in non-blocking mode
// we'll get an error (this may happen during the speculative write).
Expand All @@ -103,7 +103,7 @@ int zmq::tcp_socket_t::read (void *data, int size)
{
int nbytes = recv (s, (char*) data, size, 0);

LOGD() << "TCP bytes received: " << nbytes << LOG_ENDL();
//LOGD() << "TCP bytes received: " << nbytes << LOG_ENDL();

// If not a single byte can be read from the socket in non-blocking mode
// we'll get an error (this may happen during the speculative read).
Expand Down Expand Up @@ -190,7 +190,7 @@ int zmq::tcp_socket_t::write (const void *data, int size)
{
ssize_t nbytes = send (s, data, size, 0);

LOGD() << "TCP bytes sent: " << nbytes << LOG_ENDL();
//LOGD() << "TCP bytes sent: " << nbytes << LOG_ENDL();

// Several errors are OK. When speculative write is being done we may not
// be able to write a single byte to the socket. Also, SIGSTOP issued
Expand All @@ -211,7 +211,7 @@ int zmq::tcp_socket_t::read (void *data, int size)
{
ssize_t nbytes = recv (s, data, size, 0);

LOGD() << "TCP bytes received: " << nbytes << LOG_ENDL();
//LOGD() << "TCP bytes received: " << nbytes << LOG_ENDL();

// Several errors are OK. When speculative read is being done we may not
// be able to read a single byte to the socket. Also, SIGSTOP issued
Expand Down

0 comments on commit 3289947

Please sign in to comment.