param: Add new 'logging' parameter
authorChristof Schmitt <cs@samba.org>
Fri, 9 Jan 2015 21:21:32 +0000 (14:21 -0700)
committerChristof Schmitt <cs@samba.org>
Mon, 23 Mar 2015 20:22:11 +0000 (21:22 +0100)
This parameter allows to configure multiple backends at the same time.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
docs-xml/smbdotconf/logging/logging.xml [new file with mode: 0644]
lib/param/param_table.c

diff --git a/docs-xml/smbdotconf/logging/logging.xml b/docs-xml/smbdotconf/logging/logging.xml
new file mode 100644 (file)
index 0000000..f888c46
--- /dev/null
@@ -0,0 +1,37 @@
+<samba:parameter name="logging"
+                type="string"
+                context="G"
+                developer="1" advanced="1"
+                xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+
+  <para>This parameter configures logging backends backends. Multiple
+    backends can be specified at the same time, with different log
+    levels for each backend. The parameter is a list of backends,
+    where each backend is specified as backend[:option][@loglevel].</para>
+
+  <para>The 'option' parameter can be used to pass backend-specific
+    options.</para>
+
+  <para>The log level for a backend is optional, if it is not set for
+    a backend, all messages are sent to this backend. The parameter
+    <smbconfoption name="log level"/> determines overall log levels,
+    while the log levels specified here define what is sent to the
+    individual backends.</para>
+
+  <para>When <smbconfoption name="logging"/> is set, it overrides the
+    <smbconfoption  name="syslog"/>  and  <smbconfoption  name="syslog
+    only"/> parameters.</para>
+
+  <para>Some backends are only available when Samba has been compiled
+  with the additional libraries. The overall list of logging backends:</para>
+
+  <itemizedlist>
+    <listitem><para><parameter moreinfo="none">syslog</parameter></para></listitem>
+    <listitem><para><parameter moreinfo="none">file</parameter></para></listitem>
+  </itemizedlist>
+
+</description>
+<value type="default"></value>
+<value type="example">syslog@1 file</value>
+</samba:parameter>
index 447c99ba4f8a3c37f988b8cb06f7b16a62773a63..464a7c98e1576b2a1dd5f09a4106c68ec53d8494 100644 (file)
@@ -1205,6 +1205,15 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
+       {
+               .label          = "logging",
+               .type           = P_STRING,
+               .p_class        = P_GLOBAL,
+               .offset         = GLOBAL_VAR(logging),
+               .special        = NULL,
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
+       },
        {
                .label          = "max log size",
                .type           = P_BYTES,