Skip to content

Commit 69fe06a

Browse files
committed
Remove noop log handler
1 parent 0ea1c5e commit 69fe06a

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

php_phongo.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,6 @@ static void php_phongo_log(mongoc_log_level_t log_level, const char *log_domain,
232232
}
233233
}
234234

235-
void phongo_log_writer(mongoc_stream_t *stream, int32_t timeout_msec, ssize_t sent, size_t iovcnt)
236-
{
237-
php_phongo_stream_socket *base_stream = (php_phongo_stream_socket *)stream;
238-
239-
/* FIXME: In a ReplicaSet, node->stream is not guranteed to be the wrapped stream, only the raw mongoc_stream_t */
240-
/*mongoc_log(MONGOC_LOG_LEVEL_MESSAGE, MONGOC_LOG_DOMAIN, "Wrote %zd bytes to '%s:%d' in %zd iterations", sent, base_stream->host->host, base_stream->host->port, iovcnt);*/
241-
}
242-
243-
php_phongo_stream_logger phongo_stream_logger = {
244-
phongo_log_writer,
245-
};
246-
247235
/* }}} */
248236

249237
/* {{{ Init objects */
@@ -715,9 +703,6 @@ ssize_t phongo_stream_writev(mongoc_stream_t *stream, mongoc_iovec_t *iov, size_
715703
for (i = 0; i < iovcnt; i++) {
716704
sent += php_stream_write(base_stream->stream, iov[i].iov_base, iov[i].iov_len);
717705
}
718-
if (base_stream->log.writer) {
719-
base_stream->log.writer(stream, timeout_msec, sent, iovcnt);
720-
}
721706

722707
return sent;
723708
} /* }}} */
@@ -1036,7 +1021,6 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
10361021
base_stream->stream = stream;
10371022
base_stream->uri = uri;
10381023
base_stream->host = host;
1039-
base_stream->log = phongo_stream_logger;
10401024
TSRMLS_SET_CTX(base_stream->tsrm_ls);
10411025

10421026
/* flush missing, doesn't seem to be used */

php_phongo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ typedef struct
8383
php_stream *stream;
8484
const mongoc_uri_t *uri;
8585
const mongoc_host_list_t *host;
86-
php_phongo_stream_logger log;
8786
#if ZTS
8887
void ***tsrm_ls;
8988
#endif

0 commit comments

Comments
 (0)