Commit a147db9a authored by Dominik Charousset's avatar Dominik Charousset

Reduce verbosity of network components

parent 167d9f3c
...@@ -107,8 +107,8 @@ behavior basp_broker::make_behavior() { ...@@ -107,8 +107,8 @@ behavior basp_broker::make_behavior() {
erase_proxy(nid, aid); erase_proxy(nid, aid);
}, },
others() >> [=] { others() >> [=] {
CAF_LOG_ERROR("received unexpected message: " CAF_LOG_INFO("received unexpected message: "
<< to_string(last_dequeued())); << to_string(last_dequeued()));
} }
}; };
} }
...@@ -122,7 +122,7 @@ void basp_broker::new_data(connection_context& ctx, buffer_type& buf) { ...@@ -122,7 +122,7 @@ void basp_broker::new_data(connection_context& ctx, buffer_type& buf) {
binary_deserializer bd{buf.data(), buf.size(), &m_namespace}; binary_deserializer bd{buf.data(), buf.size(), &m_namespace};
read(bd, ctx.hdr); read(bd, ctx.hdr);
if (!basp::valid(ctx.hdr)) { if (!basp::valid(ctx.hdr)) {
CAF_LOG_ERROR("invalid broker message received"); CAF_LOG_INFO("invalid broker message received");
close(ctx.hdl); close(ctx.hdl);
return; return;
} }
...@@ -182,9 +182,8 @@ void basp_broker::dispatch(const actor_addr& from, ...@@ -182,9 +182,8 @@ void basp_broker::dispatch(const actor_addr& from,
auto dest = to.node(); auto dest = to.node();
auto hdl = get_route(dest); auto hdl = get_route(dest);
if (hdl.invalid()) { if (hdl.invalid()) {
CAF_LOG_WARNING("unable to dispatch message: no route to " CAF_LOG_INFO("unable to dispatch message: no route to "
<< to_string(dest) << ", message: " << to_string(dest) << ", message: " << to_string(msg));
<< to_string(msg));
return; return;
} }
auto& buf = wr_buf(hdl); auto& buf = wr_buf(hdl);
...@@ -253,8 +252,8 @@ basp_broker::handle_basp_header(connection_context& ctx, ...@@ -253,8 +252,8 @@ basp_broker::handle_basp_header(connection_context& ctx,
auto hdl = get_route(hdr.dest_node); auto hdl = get_route(hdr.dest_node);
if (hdl.invalid()) { if (hdl.invalid()) {
// TODO: signalize that we don't have route to given node // TODO: signalize that we don't have route to given node
CAF_LOG_ERROR("message dropped: no route to node " CAF_LOG_INFO("message dropped: no route to node "
<< to_string(hdr.dest_node)); << to_string(hdr.dest_node));
return close_connection; return close_connection;
} }
auto& buf = wr_buf(hdl); auto& buf = wr_buf(hdl);
...@@ -315,7 +314,7 @@ basp_broker::handle_basp_header(connection_context& ctx, ...@@ -315,7 +314,7 @@ basp_broker::handle_basp_header(connection_context& ctx,
case basp::client_handshake: { case basp::client_handshake: {
CAF_REQUIRE(payload == nullptr); CAF_REQUIRE(payload == nullptr);
if (ctx.remote_id != invalid_node_id) { if (ctx.remote_id != invalid_node_id) {
CAF_LOG_WARNING("received unexpected client handshake"); CAF_LOG_INFO("received unexpected client handshake");
return close_connection; return close_connection;
} }
ctx.remote_id = hdr.source_node; ctx.remote_id = hdr.source_node;
...@@ -324,7 +323,7 @@ basp_broker::handle_basp_header(connection_context& ctx, ...@@ -324,7 +323,7 @@ basp_broker::handle_basp_header(connection_context& ctx,
return close_connection; return close_connection;
} }
else if (!try_set_default_route(ctx.remote_id, ctx.hdl)) { else if (!try_set_default_route(ctx.remote_id, ctx.hdl)) {
CAF_LOG_WARNING("multiple incoming connections " CAF_LOG_INFO("multiple incoming connections "
"from the same node"); "from the same node");
return close_connection; return close_connection;
} }
...@@ -333,12 +332,12 @@ basp_broker::handle_basp_header(connection_context& ctx, ...@@ -333,12 +332,12 @@ basp_broker::handle_basp_header(connection_context& ctx,
case basp::server_handshake: { case basp::server_handshake: {
CAF_REQUIRE(payload != nullptr); CAF_REQUIRE(payload != nullptr);
if (ctx.handshake_data == nullptr) { if (ctx.handshake_data == nullptr) {
CAF_LOG_WARNING("received unexpected server handshake"); CAF_LOG_INFO("received unexpected server handshake");
return close_connection; return close_connection;
} }
if (hdr.operation_data != basp::version) { if (hdr.operation_data != basp::version) {
CAF_LOG_ERROR("tried to connect to a node with " CAF_LOG_INFO("tried to connect to a node with "
"different BASP version"); "different BASP version");
return close_connection; return close_connection;
} }
ctx.remote_id = hdr.source_node; ctx.remote_id = hdr.source_node;
...@@ -404,10 +403,9 @@ basp_broker::handle_basp_header(connection_context& ctx, ...@@ -404,10 +403,9 @@ basp_broker::handle_basp_header(connection_context& ctx,
<< to_string(nid) << to_string(nid)
<< " (re-use old one)"); << " (re-use old one)");
auto proxy = m_namespace.get(nid, remote_aid); auto proxy = m_namespace.get(nid, remote_aid);
CAF_LOG_WARNING_IF(!proxy, CAF_LOG_INFO_IF(!proxy,
"no proxy for published actor " "no proxy for published actor found "
"found although an open " "although an open connection exists");
"connection exists");
// discard this peer; there's already an open connection // discard this peer; there's already an open connection
ctx.handshake_data->result->set_value(std::move(proxy)); ctx.handshake_data->result->set_value(std::move(proxy));
ctx.handshake_data = nullptr; ctx.handshake_data = nullptr;
...@@ -439,8 +437,7 @@ void basp_broker::send_kill_proxy_instance(const id_type& nid, ...@@ -439,8 +437,7 @@ void basp_broker::send_kill_proxy_instance(const id_type& nid,
auto hdl = get_route(nid); auto hdl = get_route(nid);
CAF_LOG_DEBUG(CAF_MARG(hdl, id)); CAF_LOG_DEBUG(CAF_MARG(hdl, id));
if (hdl.invalid()) { if (hdl.invalid()) {
CAF_LOG_WARNING("message dropped, no route to node: " CAF_LOG_INFO("message dropped, no route to node: " << to_string(nid));
<< to_string(nid));
return; return;
} }
auto& buf = wr_buf(hdl); auto& buf = wr_buf(hdl);
...@@ -481,8 +478,8 @@ actor_proxy_ptr basp_broker::make_proxy(const id_type& nid, actor_id aid) { ...@@ -481,8 +478,8 @@ actor_proxy_ptr basp_broker::make_proxy(const id_type& nid, actor_id aid) {
if (hdl.invalid()) { if (hdl.invalid()) {
// this happens if and only if we don't have a path to @p nid // this happens if and only if we don't have a path to @p nid
// and m_current_context->hdl has been blacklisted // and m_current_context->hdl has been blacklisted
CAF_LOG_WARNING("cannot create a proxy instance for an actor " CAF_LOG_INFO("cannot create a proxy instance for an actor "
"running on a node we don't have a route to"); "running on a node we don't have a route to");
return nullptr; return nullptr;
} }
// create proxy and add functor that will be called if we // create proxy and add functor that will be called if we
......
...@@ -215,8 +215,8 @@ void broker::invoke_message(const actor_addr& sender, ...@@ -215,8 +215,8 @@ void broker::invoke_message(const actor_addr& sender,
} }
} }
catch (std::exception& e) { catch (std::exception& e) {
CAF_LOG_ERROR("broker killed due to an unhandled exception: " CAF_LOG_INFO("broker killed due to an unhandled exception: "
<< to_verbose_string(e)); << to_verbose_string(e));
// keep compiler happy in non-debug mode // keep compiler happy in non-debug mode
static_cast<void>(e); static_cast<void>(e);
quit(exit_reason::unhandled_exception); quit(exit_reason::unhandled_exception);
......
...@@ -84,7 +84,7 @@ inline void serialize_impl(const new_data_msg& msg, serializer* sink) { ...@@ -84,7 +84,7 @@ inline void serialize_impl(const new_data_msg& msg, serializer* sink) {
oss << "attempted to send more than " oss << "attempted to send more than "
<< std::numeric_limits<uint32_t>::max() << " bytes"; << std::numeric_limits<uint32_t>::max() << " bytes";
auto errstr = oss.str(); auto errstr = oss.str();
CAF_LOGF_ERROR(errstr); CAF_LOGF_INFO(errstr);
throw std::ios_base::failure(std::move(errstr)); throw std::ios_base::failure(std::move(errstr));
} }
sink->write_value(buf_size); sink->write_value(buf_size);
......
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