mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-21 07:10:43 -05:00
- Minor Python doc fix for testing commit post-hooks.
git-svn-id: file:///svn/unbound/trunk@3948 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
7b948b0647
commit
ba448fbd54
1 changed files with 9 additions and 5 deletions
|
|
@ -1,10 +1,12 @@
|
||||||
.. _log_handler:
|
.. _log_handler:
|
||||||
|
|
||||||
Packet logger
|
Packet logger
|
||||||
=========================
|
=============
|
||||||
|
|
||||||
This example shows how to log and print details about query and response.
|
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.
|
This packet will be send to a client that asked for it.
|
||||||
|
|
||||||
Complete source code
|
Complete source code
|
||||||
|
|
@ -14,14 +16,16 @@ Complete source code
|
||||||
:language: python
|
:language: python
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
------------------
|
-------
|
||||||
Run the unbound server:
|
Run the unbound server:
|
||||||
|
|
||||||
``root@localhost>unbound -dv -c ./test-log.conf``
|
``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: response for <f.gtld-servers.NET. AAAA IN>
|
||||||
[1231790168] unbound[7941:0] info: reply from <gtld-servers.NET.> 192.5.6.31#53
|
[1231790168] unbound[7941:0] info: reply from <gtld-servers.NET.> 192.5.6.31#53
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue