diff --git a/lokimq/auth.cpp b/lokimq/auth.cpp index 068da56..f4c2bed 100644 --- a/lokimq/auth.cpp +++ b/lokimq/auth.cpp @@ -165,7 +165,7 @@ void LokiMQ::process_zap_requests() { status_text = "Access denied"; user_id.clear(); } else { - LMQ_LOG(info, "Accepted incoming ", view(frames[5]), (sn ? " service node" : " client"), + LMQ_LOG(debug, "Accepted incoming ", view(frames[5]), (sn ? " service node" : " client"), " connection with authentication level ", result.auth, " from ", !user_id.empty() ? user_id + " at " : ""s, ip); diff --git a/lokimq/connections.cpp b/lokimq/connections.cpp index b3f829f..636c9dc 100644 --- a/lokimq/connections.cpp +++ b/lokimq/connections.cpp @@ -190,7 +190,7 @@ void LokiMQ::proxy_expire_idle_peers() { ++it; continue; } - LMQ_LOG(info, "Closing outgoing connection to ", it->first, ": idle timeout reached"); + LMQ_LOG(debug, "Closing outgoing connection to ", it->first, ": idle timeout reached"); proxy_close_connection(info.conn_index, CLOSE_LINGER); } else { ++it; @@ -277,7 +277,7 @@ void LokiMQ::proxy_connect_remote(bt_dict_consumer data) { if (conn_id == -1 || remote.empty()) throw std::runtime_error("Internal error: CONNECT_REMOTE proxy command missing required 'conn_id' and/or 'remote' value"); - LMQ_LOG(info, "Establishing remote connection to ", remote, remote_pubkey.empty() ? " (NULL auth)" : " via CURVE expecting pubkey " + to_hex(remote_pubkey)); + LMQ_LOG(debug, "Establishing remote connection to ", remote, remote_pubkey.empty() ? " (NULL auth)" : " via CURVE expecting pubkey " + to_hex(remote_pubkey)); assert(conn_index_to_id.size() == connections.size()); @@ -332,7 +332,7 @@ void LokiMQ::proxy_disconnect(ConnectionID conn, std::chrono::milliseconds linge for (auto it = pr.first; it != pr.second; ++it) { auto& peer = it->second; if (peer.outgoing()) { - LMQ_LOG(info, "Closing outgoing connection to ", conn); + LMQ_LOG(debug, "Closing outgoing connection to ", conn); proxy_close_connection(peer.conn_index, linger); return; } diff --git a/lokimq/proxy.cpp b/lokimq/proxy.cpp index 9893a45..91465ad 100644 --- a/lokimq/proxy.cpp +++ b/lokimq/proxy.cpp @@ -223,8 +223,7 @@ void LokiMQ::proxy_reply(bt_dict_consumer data) { break; } catch (const zmq::error_t &err) { if (err.num() == EHOSTUNREACH) { - LMQ_LOG(info, "Unable to send reply to incoming non-SN request: remote is no longer connected"); - LMQ_LOG(debug, "Incoming connection is no longer valid; removing peer details"); + LMQ_LOG(debug, "Unable to send reply to incoming non-SN request: remote is no longer connected; removing peer details"); it = peers.erase(it); } else { LMQ_LOG(warn, "Unable to send reply to incoming non-SN request: ", err.what()); @@ -500,7 +499,7 @@ bool LokiMQ::proxy_handle_builtin(size_t conn_index, std::vector LMQ_LOG(warn, "Got invalid 'HI' message on an outgoing connection; ignoring"); return true; } - LMQ_LOG(info, "Incoming client from ", peer_address(parts.back()), " sent HI, replying with HELLO"); + LMQ_LOG(debug, "Incoming client from ", peer_address(parts.back()), " sent HI, replying with HELLO"); try { send_routed_message(connections[conn_index], std::string{route}, "HELLO"); } catch (const std::exception &e) { LMQ_LOG(warn, "Couldn't reply with HELLO: ", e.what()); } @@ -523,7 +522,7 @@ bool LokiMQ::proxy_handle_builtin(size_t conn_index, std::vector return true; } - LMQ_LOG(info, "Got initial HELLO server response from ", peer_address(parts.back())); + LMQ_LOG(debug, "Got initial HELLO server response from ", peer_address(parts.back())); proxy_schedule_reply_job([on_success=std::move(std::get(pc)), conn=conn_index_to_id[conn_index]] { on_success(conn); @@ -537,7 +536,7 @@ bool LokiMQ::proxy_handle_builtin(size_t conn_index, std::vector AuthLevel a; std::tie(pk, sn, a) = detail::extract_metadata(parts.back()); ConnectionID conn = sn ? ConnectionID{std::move(pk)} : conn_index_to_id[conn_index]; - LMQ_LOG(info, "BYE command received; disconnecting from ", conn); + LMQ_LOG(debug, "BYE command received; disconnecting from ", conn); proxy_disconnect(conn, 1s); } else { LMQ_LOG(warn, "Got invalid 'BYE' command on an incoming socket; ignoring");