Skip to content

Commit

Permalink
Log friendly message type name in onMessageBegin
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Dec 14, 2023
1 parent 46f3d3e commit ced349e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ripple/overlay/impl/PeerImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,8 @@ PeerImp::onMessageBegin(
std::size_t uncompressed_size,
bool isCompressed)
{
load_event_ =
app_.getJobQueue().makeLoadEvent(jtPEER, protocolMessageName(type));
auto const type_name = protocolMessageName(type);
load_event_ = app_.getJobQueue().makeLoadEvent(jtPEER, type_name);
fee_ = Resource::feeLightPeer;
auto const category = TrafficCount::categorize(*m, type, true);
overlay_.reportTraffic(category, true, static_cast<int>(size));
Expand All @@ -1031,8 +1031,9 @@ PeerImp::onMessageBegin(
overlay_.addTxMetrics(
static_cast<MessageType>(type), static_cast<std::uint64_t>(size));
}
JLOG(journal_.trace()) << "onMessageBegin: " << type << " " << size << " "
<< uncompressed_size << " " << isCompressed;
JLOG(journal_.debug()) << "onMessageBegin: " << type_name << "(" << type
<< ") " << size << " " << uncompressed_size << " "
<< isCompressed;
}

void
Expand Down

0 comments on commit ced349e

Please sign in to comment.