Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how start elasticsearch with debug / verbose

i have a really hard time setting up JDBC river mysql connector with my elasticsearch installation

first i follow all the https://github.com/jprante/elasticsearch-river-jdbc howto

diffrence is where i install the elasticsearch from RPM repository via yum install elasticsearch, somehow it installed my elasticsearch in /usr/share/elasticsearch but the config are in /etc/elasticsearch

the problem lies when i installed the jdbc plugin, after installed already checked via plugin -l and yes there is a jdbc driver, but when i run bin/elasticsearch

it shows nothing helpfull just like

enter image description here

is it working? how could i show [DEBUG] and [INFO] ?

like image 635
Adam Ramadhan Avatar asked Jun 07 '14 15:06

Adam Ramadhan


3 Answers

Outdated question, but probably, can be helpful for someone else.

./elasticsearch -Des.logger.level=DEBUG

Thanks :)

like image 184
Zada Zorg Avatar answered Oct 28 '22 16:10

Zada Zorg


In the more recent version of ES, i.e. 7.x the option is

-v for verbose

bin/elasticsearch -v
like image 31
Vijay Kumar Avatar answered Oct 28 '22 18:10

Vijay Kumar


There's a log4j2.properties file, typically in the config directory (along with elasticsearch.yml). There, you have full control over logging. You can set everything to DEBUG via:

rootLogger.level = debug

Though if I want more verbose logging for a specific chunk of code, I usually use the Cluster Update Settings API. Something like:

curl -XPUT -H 'Content-Type: application/json' localhost:9200/_cluster/settings -d '{
  "transient": {
    "logger.org.xbib.elasticsearch.jdbc.strategy": "trace"
  }
}'

Though the JDBC importer hasn't been updated for a while now.

like image 35
Radu Gheorghe Avatar answered Oct 28 '22 16:10

Radu Gheorghe