New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: logs before & after all transactions #2600

Merged
merged 1 commit into from Sep 25, 2018

Conversation

Projects
None yet
2 participants
@hackaugusto
Collaborator

hackaugusto commented Sep 25, 2018

To make debugging easier some of the proxies have logs for before and
after the transaction is sent. This adds these logs lines to the missing
proxies.

The general guidelined followed was:

  • logs prior to the transaction sent are debugging logs
  • logs after the transaction is mined are:
    • critical if the transaction failed in an unrecoverable manner
    • info if the transaction failed in a recoverable manner
    • info if the transaction was successful
  • the logs are formatedd with <smart_contract_function_name> <state>,
    where state is one of these:
    • called
    • failed
    • successful

This did improve the logging but it's not covering all cases, specially
the checks done in the channel proxy which can raise an exception

@hackaugusto hackaugusto changed the title from logging: loggin for before/after all transactions to logging: logs before & after all transactions Sep 25, 2018

@hackaugusto hackaugusto force-pushed the hackaugusto:proxis_logging branch from 7d35d36 to 07c5a2e Sep 25, 2018

logging: logs before & after all transactions
To make debugging easier some of the proxies have logs for before and
after the transaction is sent. This adds these logs lines to the missing
proxies.

The general guidelined followed was:
- logs prior to the transaction sent are debugging logs
- logs after the transaction is mined are:
  - critical if the transaction failed in an unrecoverable manner
  - info if the transaction failed in a recoverable manner
  - info if the transaction was successful
- the logs are formatedd with `<smart_contract_function_name> <state>`,
where state is one of these:
  - called
  - failed
  - successful

This did improve the logging but it's not covering all cases, specially
the checks done in the channel proxy which can raise an exception

@hackaugusto hackaugusto force-pushed the hackaugusto:proxis_logging branch from 07c5a2e to cbe908e Sep 25, 2018

@palango

One nit, otherwise looks solid.

@@ -150,20 +150,22 @@ def new_netting_channel(
if self.node_address == partner:
raise SamePeerAddress('The other peer must not have the same address as the client.')
log_details = {
'peer1': pex(self.node_address),

This comment has been minimized.

@palango

palango Sep 25, 2018

Collaborator

These should be called participant, we never use peer as far as I know.

@hackaugusto hackaugusto merged commit 2bdaf30 into raiden-network:master Sep 25, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@hackaugusto hackaugusto deleted the hackaugusto:proxis_logging branch Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment