plugin: Handle log notifications from plugins

Logs are parsed and injected into the main daemon's logs.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-12-06 16:00:08 +01:00
committed by Rusty Russell
parent dc25c43945
commit a304db9be2
3 changed files with 54 additions and 1 deletions

View File

@@ -47,6 +47,10 @@ def test_rpc_passthrough(node_factory):
cmd = [hlp for hlp in n.rpc.help()['help'] if 'hello' in hlp['command']]
assert(len(cmd) == 1)
# While we're at it, let's check that helloworld.py is logging
# correctly via the notifications plugin->lightningd
assert n.daemon.is_in_log('Plugin helloworld.py initialized')
# Now try to call it and see what it returns:
greet = n.rpc.hello(name='Sun')
assert(greet == "Hello Sun")