can save logs to a text file or to a database (created using
:iscman:`kea-admin`; see :ref:`mysql-database-create` and :ref:`pgsql-database-create`).
The library is installed alongside the Kea libraries in
-``[kea-install-dir]/var/lib/kea``, where ``kea-install-dir`` is determined
+``[kea-install-dir]/var/log/kea``, where ``kea-install-dir`` is determined
by the ``--prefix`` meson setup option which defaults to
``/usr/local``. Assuming the default value, :iscman:`kea-dhcp4` can be configured to load
:ischooklib:`libdhcp_legal_log.so` like this:
{
"library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
"parameters": {
- "path": "/var/lib/kea/log",
+ "path": "/var/log/kea",
"base-name": "kea-forensic4"
}
}
{
"library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
"parameters": {
- "path": "/var/lib/kea/log",
+ "path": "/var/log/kea",
"base-name": "kea-forensic6"
}
}
{
"library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
"parameters": {
- "path": "/var/lib/kea/log",
+ "path": "/var/log/kea",
"base-name": "kea-forensic6",
"request-parser-format": "'first line' + 0x0a + 'second line'",
"response-parser-format": "'also second line' + 0x0a + 'third line'"
{
"library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
"parameters": {
- "path": "/var/lib/kea/log",
+ "path": "/var/log/kea",
"base-name": "kea-forensic6",
"timestamp-format": "%H%t%w %F%%"
}
"hooks-libraries": [
{ "library": "/usr/local/lib/libdhcp_legal_log.so",
"parameters": {
- "path": "/var/lib/kea",
+ "path": "/var/log/kea",
"base-name": "kea-legal4" } },
...
]
"hooks-libraries": [
{ "library": "/usr/local/lib/libdhcp_legal_log.so",
"parameters": {
- "path": "/var/lib/kea",
+ "path": "/var/log/kea",
"base-name": "kea-legal6" } },
...
]
Two string Hook Library Parameters are supported:
- @b path - Directory in which the legal file(s) will be written. The
- default value is "<prefix>/var/lib/kea". The directory must exist.
+ default value is "<prefix>/var/log/kea". The directory must exist.
- @b base-name - An arbitrary value which is used in conjunction with
the current system date to form the current legal file name. It defaults
to "kea-legal".