elastic / elastic/logstash

Improve warning messages about logstash.yml location and log4j2 config file

Open
#6,582 21 comments 7 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
1d 4h
Merged PRs (30d)
88

Description

- Version: 5.1.2, deb installer
- Operating System: Ubuntu 16.04
- Steps to Reproduce:

When starting logstash from /usr/share/logstash dir with following command:

`sudo bin/logstash -f ~/test.conf`

It prints out:
```
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs to console
```
1) There is a logstash.yml in my /etc/logstash dir. The warning message above implies that if I had logstash.yml in /etc/logstash, there wouldn't be a problem. The docs suggest that logstash.yml should be in my $LS_HOME/config dir, so since I never set LS_HOME, it would make sense to get a warning message. However, if it's not okay to just have the logstash.yml in the /etc/logstash dir, the warning message should be changed.
2) The message about not being able to find log4j2 is odd in that it is looking for it in /usr/share/logstash/config. The default deb installation puts the log4j2 config file in /etc/logstash so Logstash should look in there as the default location.
3) The final sentences in each warning message should end in a period. :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.