mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-01-31 01:25:18 +01:00
Add Message logging
This commit is contained in:
@@ -188,7 +188,7 @@ namespace fmt
|
||||
result.append(separator);
|
||||
}
|
||||
|
||||
return result.append(source.back());
|
||||
return result.append(*end);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -1085,6 +1085,11 @@ namespace np
|
||||
|
||||
void np_handler::send_message(const message_data& msg_data, const std::set<std::string>& npids)
|
||||
{
|
||||
const std::string npids_string = fmt::format("\"%s\"", fmt::merge(npids, "\",\""));
|
||||
|
||||
rpcn_log.notice("Sending message to %s:", npids_string);
|
||||
msg_data.print();
|
||||
|
||||
get_rpcn()->send_message(msg_data, npids);
|
||||
}
|
||||
|
||||
|
||||
@@ -3122,6 +3122,7 @@ namespace rpcn
|
||||
|
||||
if (sdata.is_error())
|
||||
{
|
||||
rpcn_log.error("Error parsing MessageReceived notification");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3143,6 +3144,9 @@ namespace rpcn
|
||||
strcpy_trunc(mdata.commId.data, pb_mdata->communicationid());
|
||||
mdata.data.assign(pb_mdata->data().begin(), pb_mdata->data().end());
|
||||
|
||||
rpcn_log.notice("Received message from %s:", sender);
|
||||
mdata.print();
|
||||
|
||||
// Save the message and call callbacks
|
||||
{
|
||||
std::lock_guard lock(mutex_messages);
|
||||
|
||||
Reference in New Issue
Block a user