Skip to content

Commit

Permalink
trace level and delete assert nullptr before use
Browse files Browse the repository at this point in the history
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
  • Loading branch information
lambdai committed Feb 23, 2021
1 parent 2d603b8 commit 171b6d4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions source/common/config/grpc_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ class GrpcStream : public Grpc::AsyncStreamCallbacks<ResponseProto>,
bool grpcStreamAvailable() const { return stream_ != nullptr; }

void sendMessage(const RequestProto& request) {
ASSERT(stream_ != nullptr, absl::StrCat("sending message to invalid grpc stream for method ",
service_method_.DebugString()));
stream_->sendMessage(request, false);
}

Expand Down
2 changes: 1 addition & 1 deletion source/common/event/dispatcher_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void DispatcherImpl::shutdown() {
ASSERT(!shutdown_called_);
shutdown_called_ = true;
ENVOY_LOG(
debug,
trace,
"{} destroyed {} thread local objects. Peek {} deferred deletables, {} post callbacks. ",
__FUNCTION__, deferred_deletables_size, post_callbacks_size, thread_local_deletables_size);
}
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/upstream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ ClusterImplBase::ClusterImplBase(
std::move(socket_matcher), std::move(stats_scope), added_via_api,
factory_context),
[&dispatcher](const ClusterInfoImpl* self) {
ENVOY_LOG(debug, "Schedule destroy cluster info {}", self->name());
ENVOY_LOG(trace, "Schedule destroy cluster info {}", self->name());
dispatcher.deleteInDispatcherThread(
std::unique_ptr<const Event::DispatcherThreadDeletable>(self));
});
Expand Down

0 comments on commit 171b6d4

Please sign in to comment.