Description
Logstash information:
Please include the following information:
- Logstash version (e.g.
bin/logstash --version
):main
,8.x
- Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker): any
- How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes): any
Plugins installed: (bin/logstash-plugin list --verbose
): N/A
JVM (e.g. java -version
): Any
If the affected version of Logstash is 7.9 (or earlier), or if it is NOT using the bundled JDK or using the 'no-jdk' version in 7.10 (or higher), please provide the following information:
- JVM version (
java -version
) - JVM installation source (e.g. from the Operating System's package manager, from source, etc).
- Value of the
LS_JAVA_HOME
environment variable if set.
OS version (uname -a
if on a Unix-like system): any
Description of the problem including expected versus actual behavior:
When using a setting that has been deprecated (such as http.enabled
, which has been superseded by api.enabled
), the deprecation log is emitted prior to the deprecation log being configured, so no log entry gets appended to the deprecation log.
Steps to reproduce:
Start Logstash using a deprecated setting, and observe the output:
╭─{ rye@perhaps:~/src/elastic/scratch/202407-json-perf-regression/logstash-8.13.2 } ╰─○ (echo 'http.enabled: false' > config/logstash.yml) && bin/logstash --log.level=debug -e 'input { generator { count => 1 } }' 2>&1 | egrep --ignore-case '\bapi.enabled\b' [2024-07-16T15:58:29,886][DEBUG][logstash.runner ] *api.enabled: false (via deprecated `http.enabled`; default: true) [2024-07-16T15:58:30,024][INFO ][logstash.agent ] HTTP API is disabled (`api.enabled=false`); webserver will not be started. [success (00:00:05)]
Inspect the deprecation log and see that it does not contain the expected deprecation warning:
╭─{ rye@perhaps:~/src/elastic/scratch/202407-deplog/logstash-8.13.2 } ╰─○ tail logs/logstash-deprecation.log [success]
We expect an entry like:
The setting `http.enabled` is a deprecated alias for `api.enabled` and will be removed in a future release of Logstash. Please use api.enabled instead
Activity