# ECK deploy es cluster，slowlog cannot write to file

**URL:** <https://discuss.elastic.co/t/eck-deploy-es-cluster-slowlog-cannot-write-to-file/369412>\
**Category:** Logs\
**Tags:** elastic-stack-monitoring\
**Created:** [October 25, 2024, 9:46am UTC](https://discuss.elastic.co/t/eck-deploy-es-cluster-slowlog-cannot-write-to-file/369412 "2024-10-25T09:46:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodboyryan008](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/goodboyryan008/32/120698_2.png) [@goodboyryan008](https://discuss.elastic.co/u/goodboyryan008)\
**Post date:** [October 25, 2024, 9:46am UTC](https://discuss.elastic.co/t/eck-deploy-es-cluster-slowlog-cannot-write-to-file/369412/1 "2024-10-25T09:46:57Z")

</div>

I deploy 7.10.1 ES cluster with ECK mode，when set slowlog but found the log not appear,  
then I found in log4j2.properties

```auto

appender.index_search_slowlog_rolling.type = Console
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
appender.index_search_slowlog_rolling.layout.type = ESJsonLayout
appender.index_search_slowlog_rolling.layout.type_name = index_search_slowlog
appender.index_search_slowlog_rolling.layout.esmessagefields=message,took,took_millis,total_hits,stats,search_type,total_shards,source,id

logger.index_search_slowlog_rolling.name = index.search.slowlog
logger.index_search_slowlog_rolling.level = trace
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
logger.index_search_slowlog_rolling.additivity = false

appender.index_indexing_slowlog_rolling.type = Console
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
appender.index_indexing_slowlog_rolling.layout.type = ESJsonLayout
appender.index_indexing_slowlog_rolling.layout.type_name = index_indexing_slowlog
appender.index_indexing_slowlog_rolling.layout.esmessagefields=message,took,took_millis,doc_type,id,routing,source

```

how to change log4j2.properties config, any buddy helps, thx?

---

<div class="post-metadata">

**Author:** ![goodboyryan008](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/goodboyryan008/32/120698_2.png) [@goodboyryan008](https://discuss.elastic.co/u/goodboyryan008)\
**Post date:** [December 2, 2024, 7:24am UTC](https://discuss.elastic.co/t/eck-deploy-es-cluster-slowlog-cannot-write-to-file/369412/2 "2024-12-02T07:24:04Z")

</div>

get done
