Following up on Aurélien's remarks (thanks for catching my forgetting it!), here's an additional patch to update the LUA-specific documentation.

Could be kept standalone or merged into the first patch, but to avoid re-submitting the patchset already, here it is standalone for now.

Tristan
From 67c3177c51044d288036044f7d17f6f037ac4f55 Mon Sep 17 00:00:00 2001
From: Tristan <tris...@mangadex.org>
Date: Fri, 20 Oct 2023 18:59:03 +0100
Subject: [PATCH] DOC: lua: update core.log and TXN.log documentation

Mention that their behaviour depends on the tunables
introduced in commit 45e6f27140 ("MINOR: lua: Add
flags to configure logging behaviour")

Rather than being entirely precise here and risk drift, simply
refer to the relevant tunables for details.

This should be backported wherever the aforementionned commit is
---
 doc/lua-api/index.rst | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/doc/lua-api/index.rst b/doc/lua-api/index.rst
index 8a29bc5b5..9b9dcbd2c 100644
--- a/doc/lua-api/index.rst
+++ b/doc/lua-api/index.rst
@@ -267,8 +267,10 @@ Core class
   **context**: body, init, task, action, sample-fetch, converter
 
   This function sends a log. The log is sent, according with the HAProxy
-  configuration file, on the default syslog server if it is configured and on
-  the stderr if it is allowed.
+  configuration file, to the loggers relevant to the current context and/or
+  stderr. 
+  
+  The exact behaviour depends on tune.lua.log and tune.lua.log-stderr tunables.
 
   :param integer loglevel: Is the log level associated with the message. It is 
a
    number between 0 and 7.
@@ -2648,8 +2650,10 @@ TXN class
 .. js:function:: TXN.log(TXN, loglevel, msg)
 
   This function sends a log. The log is sent, according with the HAProxy
-  configuration file, on the default syslog server if it is configured and on
-  the stderr if it is allowed.
+  configuration file, to the loggers relevant to the current context and/or
+  stderr. 
+  
+  The exact behaviour depends on tune.lua.log and tune.lua.log-stderr tunables.
 
   :param class_txn txn: The class txn object containing the data.
   :param integer loglevel: Is the log level associated with the message. It is
-- 
2.41.0

Reply via email to