mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Add username and ip logging for RPC method requests
This commit is contained in:
parent
7466a26cab
commit
4d74c78c69
3 changed files with 8 additions and 2 deletions
|
|
@ -367,7 +367,11 @@ void JSONRPCRequest::parse(const UniValue& valRequest)
|
|||
if (!valMethod.isStr())
|
||||
throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string");
|
||||
strMethod = valMethod.get_str();
|
||||
LogPrint(BCLog::RPC, "ThreadRPCServer method=%s\n", SanitizeString(strMethod));
|
||||
if (fLogIPs)
|
||||
LogPrint(BCLog::RPC, "ThreadRPCServer method=%s user=%s peeraddr=%s\n", SanitizeString(strMethod),
|
||||
this->authUser, this->peerAddr);
|
||||
else
|
||||
LogPrint(BCLog::RPC, "ThreadRPCServer method=%s user=%s\n", SanitizeString(strMethod), this->authUser);
|
||||
|
||||
// Parse params
|
||||
UniValue valParams = find_value(request, "params");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue