Please note that, when enabled, this logging is in addition to the logging
configured via tune.lua.log.loggers.
- Defaults to 'on'.
+ Defaults to 'auto'.
tune.max-checks-per-thread <number>
Sets the number of active checks per thread above which a thread will
**context**: body, init, task, action, sample-fetch, converter
This function sends a log. The log is sent, according with the HAProxy
- configuration file, to the loggers relevant to the current context and
+ configuration file, to the loggers relevant to the current context and/or
to stderr if it is allowed.
The exact behaviour depends on tune.lua.log.loggers and tune.lua.log.stderr.
.. js:function:: TXN.log(TXN, loglevel, msg)
This function sends a log. The log is sent, according with the HAProxy
- configuration file, to the loggers relevant to the current context and
+ configuration file, to the loggers relevant to the current context and/or
to stderr if it is allowed.
The exact behaviour depends on tune.lua.log.loggers and tune.lua.log.stderr.
[alert] 285/083533 (14465) : Hello World !
Note: By default, logs originating from a LUA script are sent to the loggers
-applicable to the current context, if any, and additionally to stderr. See
-tune.lua.log.loggers and tune.lua.log.stderr for more information.
+applicable to the current context, if any. If none are configured for use,
+logs are instead sent to stderr. See tune.lua.log.loggers and tune.lua.log.stderr
+for more information.
Default path and libraries
--------------------------
HLUA_LOG_STDERR_MASK = 0x00000030,
};
/* default log options, made of flags in hlua_log_opt */
-static uint hlua_log_opts = HLUA_LOG_LOGGERS_ON | HLUA_LOG_STDERR_ON;
+static uint hlua_log_opts = HLUA_LOG_LOGGERS_ON | HLUA_LOG_STDERR_AUTO;
/* Lua uses longjmp to perform yield or throwing errors. This
* macro is used only for identifying the function that can
}
/* This function is used to send logs. It tries to send them to:
- * - the log target applicable in the current context, AND
- * - stderr if not in quiet mode or explicitly disabled
+ * - the log target applicable in the current context, OR
+ * - stderr when no logger is in use for the current context
*/
static inline void hlua_sendlog(struct proxy *px, int level, const char *msg)
{