From ba448fbd54a78872b181b901b4bb68f7183ea55a Mon Sep 17 00:00:00 2001 From: George Thessalonikefs Date: Tue, 6 Dec 2016 14:04:42 +0000 Subject: [PATCH] - Minor Python doc fix for testing commit post-hooks. git-svn-id: file:///svn/unbound/trunk@3948 be551aaa-1e26-0410-a405-d3ace91eadb9 --- pythonmod/doc/examples/example1.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pythonmod/doc/examples/example1.rst b/pythonmod/doc/examples/example1.rst index b49e64409..ccd76da5a 100644 --- a/pythonmod/doc/examples/example1.rst +++ b/pythonmod/doc/examples/example1.rst @@ -1,10 +1,12 @@ .. _log_handler: Packet logger -========================= +============= This example shows how to log and print details about query and response. -As soon as the ``iterator`` has finished (event is :data:`module_event_moddone`), ``qstate.return_msg`` contains response packet or ``None``. +As soon as the ``iterator`` has finished (event is +:data:`module_event_moddone`), ``qstate.return_msg`` contains response packet +or ``None``. This packet will be send to a client that asked for it. Complete source code @@ -14,14 +16,16 @@ Complete source code :language: python Testing ------------------- +------- Run the unbound server: ``root@localhost>unbound -dv -c ./test-log.conf`` -In case you use own configuration file, don't forget to enable python module: ``module-config: "validator python iterator"`` and use valid script path: ``python-script: "./examples/log.py"``. +In case you use own configuration file, don't forget to enable python module: +``module-config: "validator python iterator"`` and use valid script path: +``python-script: "./examples/log.py"``. -Example of output:: +Example of output:: [1231790168] unbound[7941:0] info: response for [1231790168] unbound[7941:0] info: reply from 192.5.6.31#53