From: phonedph1 Date: Mon, 23 Dec 2019 16:29:49 +0000 (+0000) Subject: Document LogResponseAction X-Git-Tag: auth-4.3.0-beta1~49^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8654%2Fhead;p=thirdparty%2Fpdns.git Document LogResponseAction --- diff --git a/pdns/dnsdistdist/docs/rules-actions.rst b/pdns/dnsdistdist/docs/rules-actions.rst index 28cd6dbadc..a67589f64e 100644 --- a/pdns/dnsdistdist/docs/rules-actions.rst +++ b/pdns/dnsdistdist/docs/rules-actions.rst @@ -1017,6 +1017,25 @@ The following actions exist. :param bool verboseOnly: Whether to log only in verbose mode when logging to stdout. Default is true :param bool includeTimestamp: Whether to include a timestamp for every entry. Default is false +.. function:: LogResponseAction([filename[, append[, buffered[, verboseOnly[, includeTimestamp]]]]]]) + + .. versionadded:: 1.5.0 + + Log a line for each response, to the specified ``file`` if any, to the console (require verbose) if the empty string is given as filename. + + If an empty string is supplied in the file name, the logging is done to stdout, and only in verbose mode by default. This can be changed by setting ``verboseOnly`` to false. + + The ``append`` optional parameter specifies whether we open the file for appending or truncate each time (default). + The ``buffered`` optional parameter specifies whether writes to the file are buffered (default) or not. + + Subsequent rules are processed after this action. + + :param string filename: File to log to. Set to an empty string to log to the normal stdout log, this only works when ``-v`` is set on the command line. + :param bool append: Append to the log. Default false + :param bool buffered: Use buffered I/O. Default true + :param bool verboseOnly: Whether to log only in verbose mode when logging to stdout. Default is true + :param bool includeTimestamp: Whether to include a timestamp for every entry. Default is false + .. function:: LuaAction(function) Invoke a Lua function that accepts a :class:`DNSQuestion`.