liquidvotingio / decidim-module-liquidvoting

GNU Affero General Public License v3.0
4 stars 0 forks source link

Log calls to liquidvoting api #7

Closed davefrey closed 4 years ago

davefrey commented 4 years ago

In order to correlate activity in the decidim rails server and liquidvoting api, we should log whenever Decidim::Liquidvoting::Client sends an api request.

This is rails logging; here's an excerpt from log/development.log:

Started POST "/liquidvoting/delegations" for ::1 at 2020-10-29 00:25:28 +0100
LiquidVoting request sent: Decidim::Liquidvoting::Client::CreateDelegationMutation {:proposal_url=>"http://localhost/processes/officia-enim/f/12/proposals/10", :delegator_email=>"user@example.org", :delegate_email=>"endorsement-author-participatory_process-2-4-endr7@example.org"}
Started GET "/processes/officia-enim/f/12/proposals/10" for ::1 at 2020-10-29 00:25:28 +0100

I've used :info log level, and logged the mutation name rather than content, for a more concise single-line message that is easily filtered.