Skip to content
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

hackaugusto
Copy link
Contributor

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 logging: loggin for before/after all transactions logging: logs before & after all transactions 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
Copy link
Contributor

@palango palango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@hackaugusto hackaugusto deleted the proxis_logging branch September 25, 2018 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants