[php-src] PR #24575: cli: Add --loglevel for the built-in development server

From: Date: Thu, 22 Oct 2026 19:54:52 +0000
Subject: [php-src] PR #24575: cli: Add --loglevel for the built-in development server
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39737@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24575 Author: mvanhorn ## Summary The built-in server already has process, error and message log levels, but the only way to quiet request logs is repeating -q. --loglevel <n> sets the level directly: 1 process, 2 error, 3 message (default). Related: https://github.com/php/php-src/issues/16855 ## Changes - New long option --loglevel (values 1-3), documented in php -h. - Invalid values exit 1; the option is rejected unless -S is used. - Server log writes flush stderr so lines show up immediately. - NEWS and UPGRADING entries. ## Testing ``` ./buildconf && ./configure --disable-all --enable-cli --enable-debug && make -j4 make test TESTS="sapi/cli/tests/gh16855.phpt sapi/cli/tests/gh16855_default.phpt sapi/cli/tests/php_cli_server*.phpt" ``` 28 CLI server tests pass (4 skipped for missing curl/sockets/online). With --loglevel 1, only the startup line is logged; requests still return 200: ``` PHP 8.7.0-dev Development Server (http://127.0.0.1:18081) started ```

« previous php.git-pulls (#39737) next »