But under the /usr/share/elasticsearch/logs/ in the container (or on the mapped host) I only see gc.log(s) and NOT the 'normal' elasticsearch logs. How do I configure elasticsearch to get ALSO the its own, normal logs I usally have in non-docker elastic nodes? I hope I could make myself clear.
Thank you and kind regards
Stefano
Thanks, docke logs worked, but I am still wondetting: if I go into the machine with docker exec -it bash and navigate to the usal logs directory I only see the gc.log and not the logs that I see with docker logs. Why is it so? Is there a possibility to have the logs in both ways / locations at the same time?
Thanks
By doing this, you can freely configure log4j2.properties to configure logging in any way you please, and docker-compose logs (or docker logs) still works as expected.
config/log4j2.properties in the docker image only enables console logging. Docker makes container's console logs available via docker logs.
Even if a container fails to start you can get console logs to debug the issue as docker retains those for some time. If logs are stored only in a container directory (not mounted) you will lose these logs if the container fails to start or after it terminates.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.