From 80204be7dd43fb9a866d94e40562ba8ce75ac1e8 Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Thu, 6 Jan 2022 12:55:27 +0200 Subject: [PATCH] [#2208] updated documentation for timestamp-format --- doc/sphinx/arm/hooks.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst index 2001de3a5b..efffcbde27 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -739,6 +739,30 @@ The lease-client context can only be printed using the default format, as this information is not directly stored in the request packet or in the response packet. +The ``timestamp-format`` parameter can be used to change the timestamp logged +at the beginning of each line. Permissible formatting is the one supported by +strftime. The default is: "%Y-%m-%d %H:%M:%S %Z". This parameter has no effect +for the database backends, where the timestamp is defined at the schema level. + +Examples: + +.. code-block:: json + + { + "Dhcp6": { + "hooks-libraries": [ + { + "library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so", + "parameters": { + "path": "/var/lib/kea/log", + "base-name": "kea-forensic6", + "timestamp-format": "%l%t%w %F%%" + } + } + ] + } + } + Additional parameters for the database connection can be specified, e.g: .. code-block:: json