mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 06:35:04 -06:00
Add Message logging
This commit is contained in:
parent
086ab3cb37
commit
97feb4eed4
@ -188,7 +188,7 @@ namespace fmt
|
|||||||
result.append(separator);
|
result.append(separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.append(source.back());
|
return result.append(*end);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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)
|
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);
|
get_rpcn()->send_message(msg_data, npids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3122,6 +3122,7 @@ namespace rpcn
|
|||||||
|
|
||||||
if (sdata.is_error())
|
if (sdata.is_error())
|
||||||
{
|
{
|
||||||
|
rpcn_log.error("Error parsing MessageReceived notification");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3143,6 +3144,9 @@ namespace rpcn
|
|||||||
strcpy_trunc(mdata.commId.data, pb_mdata->communicationid());
|
strcpy_trunc(mdata.commId.data, pb_mdata->communicationid());
|
||||||
mdata.data.assign(pb_mdata->data().begin(), pb_mdata->data().end());
|
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
|
// Save the message and call callbacks
|
||||||
{
|
{
|
||||||
std::lock_guard lock(mutex_messages);
|
std::lock_guard lock(mutex_messages);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user