diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:28 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:29 +0200 |
| commit | 389cd6c466486e670e6f9cd74d2cfdf46f392340 (patch) | |
| tree | c4b10fac237c407badc8300b2d6116fe6a1ce7cb /external/unbound/pythonmod/doc/examples/example1.rst | |
| parent | f31b89012d5299e08ea897bf1061a5b3def8d96a (diff) | |
| parent | a85b5759f34c0c4110a479a8b5fa606f15ed9b23 (diff) | |
| download | monzero-core-389cd6c466486e670e6f9cd74d2cfdf46f392340.tar.gz monzero-core-389cd6c466486e670e6f9cd74d2cfdf46f392340.tar.xz monzero-core-389cd6c466486e670e6f9cd74d2cfdf46f392340.zip | |
Merge pull request #2089
a85b5759 Upgrade unbound library (Erik de Castro Lopo)
Diffstat (limited to 'external/unbound/pythonmod/doc/examples/example1.rst')
| -rw-r--r-- | external/unbound/pythonmod/doc/examples/example1.rst | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/external/unbound/pythonmod/doc/examples/example1.rst b/external/unbound/pythonmod/doc/examples/example1.rst index b49e64409..ccd76da5a 100644 --- a/external/unbound/pythonmod/doc/examples/example1.rst +++ b/external/unbound/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 <f.gtld-servers.NET. AAAA IN> [1231790168] unbound[7941:0] info: reply from <gtld-servers.NET.> 192.5.6.31#53 |
