From 3c589f1b2093e25c0e928e65e4bf5db814e76a0a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 2 Mar 2023 13:37:57 +1000 Subject: [PATCH] test: log all function calls to interfaces Makes debugging easier to see exactly who's being called. --- test/eiproto.py.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/eiproto.py.tmpl b/test/eiproto.py.tmpl index 7f2fe28..8a857c0 100644 --- a/test/eiproto.py.tmpl +++ b/test/eiproto.py.tmpl @@ -246,7 +246,9 @@ class {{interface.camel_name}}(Interface): {% for outgoing in interface.outgoing %} def {{outgoing.camel_name}}(self{%- for arg in outgoing.arguments %}, {{arg.name}}: {{arg.signature}}{% endfor -%}) -> bytes: - return self.format({%- for arg in outgoing.arguments %}{{arg.name}}, {% endfor -%}opcode={{outgoing.opcode}}, signature="{{outgoing.signature}}") + data = self.format({%- for arg in outgoing.arguments %}{{arg.name}}, {% endfor -%}opcode={{outgoing.opcode}}, signature="{{outgoing.signature}}") + logger.debug("composing message", oject=self, func="{{interface.name}}.{{outgoing.name}}", args={ {%- for arg in outgoing.arguments %}"{{arg.name}}": {{arg.name}}, {% endfor -%} }, result=hexlify(data)) + return data {% endfor %} {% for incoming in interface.incoming %}