Just upgraded to Elasticsearch 8. and gc logs are now written to two locations. As specified in <ES_PATH_CONF>\jvm.options.d\jvm.options
, but also to default location elasticsearch-8.13.4\logs\
. In the location specified i jvm.options, only the configured number of gc logs are kept. In elasticsearch-8.13.4\logs\
, the gc logs does not seem to be purged.
I have tested to add the file gc.options to <ES_PATH_CONF>\jvm.options.d\jvm.options
. Content:
# Turn off all previous logging configuratons
-Xlog:disable
# Default settings from JEP 158, but with `utctime` instead of `uptime` to match the next line
-Xlog:all=warning:stderr:utctime,level,tags
# Enable GC logging to a custom location with a variety of options
-Xlog:gc*,gc+age=trace,safepoint:file=C:\Elasticsearch-8\logs-gc\gc9.log:utctime,pid,tags:filecount=4,filesize=64m
But then I got gc logs in three locations.
Anyone knows how to stop the gc-logs from being written to default location elasticsearch-8.13.4\logs\
?