]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add the 'vinfolog' Lua binding
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 12 Jan 2022 15:15:17 +0000 (16:15 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 7 Oct 2022 15:48:04 +0000 (17:48 +0200)
pdns/dnsdist-lua-bindings.cc
pdns/dnsdistdist/docs/reference/logging.rst

index dd00c0485e90ace7159a9050efc5adc13979ab4f..f9c321c7e7ec0cb2eb8c78f2312bc45892ce1c19 100644 (file)
@@ -29,6 +29,9 @@
 
 void setupLuaBindings(LuaContext& luaCtx, bool client)
 {
+  luaCtx.writeFunction("vinfolog", [](const string& arg) {
+      vinfolog("%s", arg);
+    });
   luaCtx.writeFunction("infolog", [](const string& arg) {
       infolog("%s", arg);
     });
index f6751d977c3cfb394db15841e8e7617dfbdda586..c4b0c0a7941db4fa9f68b0fbf7630a17fbf616d7 100755 (executable)
@@ -22,3 +22,11 @@ There are some functions to create log output.
   Writes an info line.\r
 \r
   :param str line: The line to write.\r
+\r
+.. function:: vinfolog(line)\r
+\r
+  .. versionadded:: 1.8.0\r
+\r
+  Writes an info line if dnsdist is running in verbose (debug) mode.\r
+\r
+  :param str line: The line to write.\r