From 1b85785bc218aaa6583429ea5dfb55abe8c3489d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 25 Feb 2020 11:27:22 +0100 Subject: [PATCH] MINOR: config: mark global.debug as deprecated This directive has never made any sense and has already caused trouble by forcing the process to stay in foreground during the boot process. Let's emit a warning mentioning it's deprecated and will be removed in 2.3. --- doc/configuration.txt | 2 +- src/cfgparse-global.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index c20311d3de..6cb641e49e 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -2159,7 +2159,7 @@ tune.zlib.windowsize 3.3. Debugging -------------- -debug +debug (deprecated) Enables debug mode which dumps to stdout all exchanges, and disables forking into background. It is the equivalent of the command-line argument "-d". It should never be used in a production configuration since it may prevent full diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 3306f8cb80..0e69059760 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -57,6 +57,9 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) if (alertif_too_many_args(0, file, linenum, args, &err_code)) goto out; global.mode |= MODE_DEBUG; + ha_warning("parsing [%s:%d] : '%s' must never be used and will be removed in 2.3. If you need debug mode, please use '-d' on the command line.\n", file, linenum, args[0]); + err_code |= ERR_WARN; + goto out; } else if (!strcmp(args[0], "noepoll")) { if (alertif_too_many_args(0, file, linenum, args, &err_code)) -- 2.39.5