]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: config: mark global.debug as deprecated
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 10:27:22 +0000 (11:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 10:28:58 +0000 (11:28 +0100)
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
src/cfgparse-global.c

index c20311d3decd343b8a91ca70a0ef97fe05d9f206..6cb641e49e497e529f41f98b79fb0dc406779884 100644 (file)
@@ -2159,7 +2159,7 @@ tune.zlib.windowsize <number>
 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
index 3306f8cb80a14ed0e7f3a9538f70cccea30ae211..0e6905976049e1e01734a3c451caaf87b58bdf22 100644 (file)
@@ -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))