Below are my settings in log4j2.properties, am using 6.3.0. But slow log doesn't log anything.
appender.index_indexing_slowlog_rolling.fileName = {sys:es.logs.base_path}{sys:file.separator}{sys:es.logs.cluster_name}_index_indexing_slowlog.log
appender.index_indexing_slowlog_rolling.filePattern = {sys:es.logs.base_path}{sys:file.separator}{sys:es.logs.cluster_name}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
index.indexing.slowlog.threshold.index.warn: 1ms
index.indexing.slowlog.threshold.index.info: 1ms
index.indexing.slowlog.threshold.index.debug: 1ms
index.indexing.slowlog.threshold.index.trace: 5ms
index.indexing.slowlog.level: info
index.indexing.slowlog.source: 1000
I always find it is 0bytes. How does these variables work? I have given 1ms to log in slow log.
~# ls -ltr /var/log/elasticsearch/ | grep -i slow
-rw-r--r-- 1 elasticsearch elasticsearch 0 Jan 2 20:38 prd-es6_index_search_slowlog.log
-rw-r--r-- 1 elasticsearch elasticsearch 0 Jan 2 20:38 prd-es6_index_indexing_slowlog.log