# Can indexing slowlog level be modified in logging.yml?

**URL:** <https://discuss.elastic.co/t/can-indexing-slowlog-level-be-modified-in-logging-yml/19411>\
**Category:** Elasticsearch\
**Created:** [August 22, 2014, 2:26pm UTC](https://discuss.elastic.co/t/can-indexing-slowlog-level-be-modified-in-logging-yml/19411 "2014-08-22T14:26:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Hopper](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_hopper/32/1329_2.png) [@Tim\_Hopper](https://discuss.elastic.co/u/Tim_Hopper)\
**Post date:** [August 22, 2014, 2:26pm UTC](https://discuss.elastic.co/t/can-indexing-slowlog-level-be-modified-in-logging-yml/19411/1 "2014-08-22T14:26:40Z")

</div>

I am trying to tune how indexing slowlogs are collected. I know that I can set  
a threshold  
[https://github.com/elasticsearch/elasticsearch/blob/fdf1998f390bf1bb7741c133da7ea35e201f9aed/config/elasticsearch.yml#L364-L367](https://github.com/elasticsearch/elasticsearch/blob/fdf1998f390bf1bb7741c133da7ea35e201f9aed/config/elasticsearch.yml#L364-L367)  
for how long an indexing op on a shard must take before it is logged. I  
would also like to be choose what level I'm logging at. It would appear  
that modifying this line  
[https://github.com/elasticsearch/elasticsearch/blob/fdf1998f390bf1bb7741c133da7ea35e201f9aed/config/logging.yml#L21](https://github.com/elasticsearch/elasticsearch/blob/fdf1998f390bf1bb7741c133da7ea35e201f9aed/config/logging.yml#L21) in  
logging.yml would allow me to do this. However, unless I am  
misunderstanding the purpose of that setting, it is being ignored by  
ElasticSearch.

Here is how I came to that conclusion. I have ElasticSearch 1.3.2 running  
locally on my Mac. I these config files  
[https://gist.github.com/tdhopper/b3f07829ebd55dc5703f](https://gist.github.com/tdhopper/b3f07829ebd55dc5703f) in ~/es-config.  
This elasticsearch.yml file is bare-bones, as you can see. The logging.yml  
file only modifies this line  
[https://github.com/elasticsearch/elasticsearch/blob/0b76b0bf79d340c8938afb03736f8a17f333939b/config/logging.yml#L21](https://github.com/elasticsearch/elasticsearch/blob/0b76b0bf79d340c8938afb03736f8a17f333939b/config/logging.yml#L21) of  
the default file. My assumption is that this should mean _only_ WARN level  
indexing ops are logged.

However, if I start an ES instance using

elasticsearch --config="/Users/tdhopper/es-config/elasticsearch.yml"

and then run this Python script

import elasticsearch, time  
es = elasticsearch.Elasticsearch(hosts="localhost")

while True:  
print ".",  
es.index(index="index1", doc\_type="test\_doc", body = {"hot\_body": 1})  
time.sleep(.5)

my ~/es-logs/elasticsearch\_index\_indexing\_slowlog.log file is immediately  
filled up with lines like

[2014-08-22 10:24:52,162][INFO][index.indexing.slowlog.index] [War  
Machine] [index1][2] took[1.4ms], took\_millis[1], type[test\_doc],  
id[WH83A0yvRHaQtQ34\_6wncg], routing[], source[{"hot\_body":1}]  
[2014-08-22 10:24:52,666][INFO][index.indexing.slowlog.index] [War  
Machine] [index1][1] took[1.5ms], took\_millis[1], type[test\_doc],  
id[sErCAr3BR\_qWVfp0pnayGw], routing[], source[{"hot\_body":1}]

That is, INFO level log statements.

Am I misunderstanding the purpose of this setting or is ES ignoring my  
request?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/855ae52d-8912-4b90-adda-faf5e7158128%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/855ae52d-8912-4b90-adda-faf5e7158128%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:07am UTC](https://discuss.elastic.co/t/can-indexing-slowlog-level-be-modified-in-logging-yml/19411/2 "2017-07-06T01:07:00Z")

</div>


