I would like to activate logs of elasticsearch .
When I run elasticsearch binaries, I realize that I have problems with logging : the configuration cannot be loaded !
I got into the same issue and was wondering how they could miss it in the installation script of elastic search. So, after some digging here is what I found:
It looks like you installed elastic search using yum or apt-get or else you would have had the 'config' directory under ES_HOME.
Checking the init.d/elasticsearch shows the following:
DAEMON_OPTS="-d -p $PID_FILE --default.path.home=$ES_HOME --default.path.logs=$LOG_DIR --default.path.data=$DATA_DIR --default.path.conf=$CONF_DIR"
:
# Start Daemon
start-stop-daemon -d $ES_HOME --start -b --user "$ES_USER" -c "$ES_USER" --pidfile "$PID_FILE" --exec $DAEMON -- $DAEMON_OPTS
So, all the variables are properly initialized and then passed as command line parameters.
So, the best way for you to start is using the service:
>sudo service elasticsearch start
It will make sure that all the config and log parameters are passed to the main command.
Check logs under /var/log/$NAME
that would be '/var/log/elasticsearch`