logging.
+option dontloglegacyconnerr
+no option dontloglegacyconnerr
+ Enable or disable dedicated connection error logging.
+ May be used in sections : defaults | frontend | listen | backend
+ yes | yes | yes | no
+ Arguments : none
+
+ In case of connection error, if the option is disabled, a log line following
+ the format described in section 8.2.6, the legacy format, will be emitted.
+ Otherwise, a log line following the configured log-format for the listener
+ will be emitted. The error code and the corresponding message found in the
+ error log can be added to a log-format thanks to the "fc_conn_err" and
+ "fc_conn_err_str" sample fetches.
+
+ See also : "option httpslog" and section 8 about logging.
+
+
option mysql-check [ user <username> [ { post-41 | pre-41 } ] ]
Use MySQL health checks for server testing
May be used in sections : defaults | frontend | listen | backend
By default, logs are emitted at the LOG_INFO level, unless the option
"log-separate-errors" is set in the backend, in which case the LOG_ERR level
will be used. Connections on which no data are exchanged (e.g. probes) are not
-logged if the "dontlognull" option is set.
+logged if the "dontlognull" option is set. If the "dontloglegacyconnerr" option
+is set, those messages are not emitted and a line following the configured
+log-format is emitted instead.
The format looks like this :
#define PR_O_FF_ALWAYS 0x00002000 /* always set x-forwarded-for */
#define PR_O_PERSIST 0x00004000 /* server persistence stays effective even when server is down */
#define PR_O_LOGASAP 0x00008000 /* log as soon as possible, without waiting for the stream to complete */
-/* unused: 0x00010000 */
+#define PR_O_NOLGCYCONNERR 0x00010000 /* log a dedicated error log message in case of connection failure instead of the legacy connection error message */
+
#define PR_O_CHK_CACHE 0x00020000 /* require examination of cacheability of the 'set-cookie' field */
#define PR_O_TCP_CLI_KA 0x00040000 /* enable TCP keep-alive on client-side streams */
#define PR_O_TCP_SRV_KA 0x00080000 /* enable TCP keep-alive on server-side streams */
{ "http-ignore-probes", PR_O_IGNORE_PRB, PR_CAP_FE, 0, PR_MODE_HTTP },
{ "prefer-last-server", PR_O_PREF_LAST, PR_CAP_BE, 0, PR_MODE_HTTP },
{ "logasap", PR_O_LOGASAP, PR_CAP_FE, 0, 0 },
+ { "dontloglegacyconnerr", PR_O_NOLGCYCONNERR, PR_CAP_FE, 0, 0 },
{ "nolinger", PR_O_TCP_NOLING, PR_CAP_FE | PR_CAP_BE, 0, 0 },
{ "persist", PR_O_PERSIST, PR_CAP_BE, 0, 0 },
{ "srvtcpka", PR_O_TCP_SRV_KA, PR_CAP_BE, 0, 0 },
conn->err_code = CO_ER_SSL_TIMEOUT;
}
- session_prepare_log_prefix(sess);
- err_msg = conn_err_code_str(conn);
- if (err_msg)
- send_log(sess->fe, level, "%s: %s\n", trash.area,
- err_msg);
- else
- send_log(sess->fe, level, "%s: unknown connection error (code=%d flags=%08x)\n",
- trash.area, conn->err_code, conn->flags);
+ if (sess->fe->options & PR_O_NOLGCYCONNERR) {
+ /* Display a log line following the configured log-format. */
+ sess_log(sess);
+ }
+ else {
+ session_prepare_log_prefix(sess);
+ err_msg = conn_err_code_str(conn);
+ if (err_msg)
+ send_log(sess->fe, level, "%s: %s\n", trash.area,
+ err_msg);
+ else
+ send_log(sess->fe, level, "%s: unknown connection error (code=%d flags=%08x)\n",
+ trash.area, conn->err_code, conn->flags);
+ }
}
/* kill the connection now */