]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2134] Document acceptable format strings for logger
authorDan Theisen <djt@isc.org>
Fri, 5 Nov 2021 15:23:17 +0000 (08:23 -0700)
committerDan Theisen <djt@isc.org>
Tue, 16 Nov 2021 18:29:06 +0000 (18:29 +0000)
doc/sphinx/arm/logging.rst

index 7d8cf89a3782342ef202e76bcd9e2394d13dab65..3c488df45d7e98940fb67b498839d3e246108aca 100644 (file)
@@ -638,10 +638,68 @@ described by a string containing one or more format components as part of a
 text string.  In addition to the components the string may contain any other
 arbitrary text you find useful.
 
-The Log4Cplus documentation provides a concise discussion of the supported
-components and formatting behavior and can be seen here:
+The behavior of Kea's format strings is determined by Log4Cplus. The following
+format options are possible:
 
-    https://log4cplus.sourceforge.io/docs/html/classlog4cplus_1_1PatternLayout.html
+.. table:: List of Supported Format String Components by Kea's Logger
+   :class: longtable
+   :widths: 8 40
+
+   +-----------+-----------------------------------------------+
+   | Component | Value                                         |
+   +===========+===============================================+
+   | ``%a``    | Abbreviated weekday name                      |
+   +-----------+-----------------------------------------------+
+   | ``%A``    | Full weekday name                             |
+   +-----------+-----------------------------------------------+
+   | ``%b``    | Abbreviated month name                        |
+   +-----------+-----------------------------------------------+
+   | ``%B``    | Full month name                               |
+   +-----------+-----------------------------------------------+
+   | ``%c``    | Standard date and time string                 |
+   +-----------+-----------------------------------------------+
+   | ``%d``    | Day of month as a decimal(1-31)               |
+   +-----------+-----------------------------------------------+
+   | ``%H``    | Hour(0-23)                                    |
+   +-----------+-----------------------------------------------+
+   | ``%I``    | Hour(1-12)                                    |
+   +-----------+-----------------------------------------------+
+   | ``%j``    | Day of year as a decimal(1-366)               |
+   +-----------+-----------------------------------------------+
+   | ``%m``    | Month as decimal(1-12)                        |
+   +-----------+-----------------------------------------------+
+   | ``%M``    | Minute as decimal(0-59)                       |
+   +-----------+-----------------------------------------------+
+   | ``%p``    | Locale's equivalent of AM or PM               |
+   +-----------+-----------------------------------------------+
+   | ``%q``    | milliseconds as decimal(0-999)                |
+   +-----------+-----------------------------------------------+
+   | ``%Q``    | fractional milliseconds as decimal(0-999.999) |
+   +-----------+-----------------------------------------------+
+   | ``%S``    | Second as decimal(0-59)                       |
+   +-----------+-----------------------------------------------+
+   | ``%U``    | Week of year, Sunday being first day(0-53)    |
+   +-----------+-----------------------------------------------+
+   | ``%w``    | Weekday as a decimal(0-6, Sunday being 0)     |
+   +-----------+-----------------------------------------------+
+   | ``%W``    | Week of year, Monday being first day(0-53)    |
+   +-----------+-----------------------------------------------+
+   | ``%x``    | Standard date string                          |
+   +-----------+-----------------------------------------------+
+   | ``%X``    | Standard time string                          |
+   +-----------+-----------------------------------------------+
+   | ``%y``    | Year in decimal without century(0-99)         |
+   +-----------+-----------------------------------------------+
+   | ``%Y``    | Year including century as decimal             |
+   +-----------+-----------------------------------------------+
+   | ``%Z``    | Time zone name                                |
+   +-----------+-----------------------------------------------+
+   | ``%%``    | The percent sign                              |
+   +-----------+-----------------------------------------------+
+
+Lookup the documentation for the ``strftime()`` function found in the
+``<ctime>`` header or the ``strftime(3)`` Unix manual page for more
+information.
 
 It is probably easiest to understand this by examining the default pattern
 for stdout and files (currently they are the same).  That pattern is shown
@@ -858,4 +916,4 @@ be logged on much higher levels, such as ``WARN`` or even ``ERROR``.
   with all options printed.
 
 The debug levels apply only to messages logged on ``DEBUG``. The debug levels are configured using
-the ``debuglevel`` option. See Section :ref:`debuglevel` for details.
\ No newline at end of file
+the ``debuglevel`` option. See Section :ref:`debuglevel` for details.