RPC server: added PID and tag to resto logs
What
Adding PID and [resto] tag to Resto logs.
Why
Resto is running in several processes in Tezos: RPC server and External RPC process. We need to distinguish their outputs. Added [resto] tag to simply finding resto logs.
How
Added pid and tag to the Logging module provided to Resto on launch.
Manually testing the MR
TEZOS_LOG="*->debug" ./src/bin_node/octez-sandboxed-node.sh 1 --connections 0
eval $(./src/bin_client/octez-init-sandboxed-client.sh 1)
TEZOS_LOG="*->debug" octez-activate-alpha
Logs before:
Jun 04 16:47:59.158: connection closed 18
Jun 04 16:47:59.158: connection closed 12
Jun 04 16:47:59.158: streamed connection closed 12
Logs after:
Jun 04 16:50:28.481: [pid:16129][resto] connection closed 18
Jun 04 16:50:28.482: [pid:16070][resto] connection closed 12
Jun 04 16:50:28.482: [pid:16070][resto] streamed connection closed 12
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Julien