mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pyln: Add logging to bitcoind RPC calls
Useful if we want to debug a bit better
This commit is contained in:
@@ -321,7 +321,16 @@ class SimpleBitcoinProxy:
|
|||||||
proxy = BitcoinProxy(btc_conf_file=self.__btc_conf_file__)
|
proxy = BitcoinProxy(btc_conf_file=self.__btc_conf_file__)
|
||||||
|
|
||||||
def f(*args):
|
def f(*args):
|
||||||
return proxy._call(name, *args)
|
logging.debug("Calling {name} with arguments {args}".format(
|
||||||
|
name=name,
|
||||||
|
args=args
|
||||||
|
))
|
||||||
|
res = proxy._call(name, *args)
|
||||||
|
logging.debug("Result for {name} call: {res}".format(
|
||||||
|
name=name,
|
||||||
|
res=res,
|
||||||
|
))
|
||||||
|
return res
|
||||||
|
|
||||||
# Make debuggers show <function bitcoin.rpc.name> rather than <function
|
# Make debuggers show <function bitcoin.rpc.name> rather than <function
|
||||||
# bitcoin.rpc.<lambda>>
|
# bitcoin.rpc.<lambda>>
|
||||||
|
|||||||
Reference in New Issue
Block a user