Standard logging settings work very well for general usage.
Changing the log level can be useful to check for bugs or understanding malfunctions due to bad configuration or strange plugin behaviors. A verbose log can be used from Elasticsearch community to cover problems.
If you need to debug your Elasticsearch server or change how the logging works (that is, remoting send events), you need to change the log4j2.properties
parameters.
You need a working Elasticsearch installation as we described in the Downloading and installing Elasticsearch recipe and a simple text editor to change configuration files.
In the config
directory in your Elasticsearch install directory, there is a log4j2.properties
file, which controls the working settings.
The steps required for changing the logging settings are:
rootLogger.level = info
rootLogger.level = debug
bin/elasticsearch -f
), you should see a lot of garbage:[2017-01-11T21:34:16,369][DEBUG][o.e.b.Seccomp] BSD RLIMIT_NPROC initialization successful[2017-01-11T21:34:16,377][DEBUG] [o.e.b.Seccomp] OS X seatbelt initialization successful [2017-01-11T21:34:16,404][DEBUG][o.e.b.JarHell] java.class.path: /usr/local/Cellar/elasticsearch/5.1.1/libexec/lib/elasticsearch- 5.1.1.jar:/usr/local/Cellar/elasticsearch/5.1.1/libexec/lib /elasticsearch5.1.1.jar:/usr/local/Cellar/elasticsearch/5.1.1/ libexec/lib/HdrHistogram2.1.6.jar:/usr/local/Cellar/ elasticsearch/5.1.1/libexec/lib/hppc-0.7.1.jar:/usr /local/Cellar/ ... (truncated)...
Elasticsearch logging system is based on the log4j
library (http://logging.apache.org/log4j/).
Log4j is a powerful library to manage logging, covering all of its functionalities is outside the scope of this book. If a user needs advanced usage, there are a lot of books and articles on the Internet about it.
18.227.190.120