# How to set up Search Slow Log for embedded ES

**URL:** <https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409>\
**Category:** Elasticsearch\
**Created:** [January 17, 2012, 11:49am UTC](https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409 "2012-01-17T11:49:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Runar\_Myklebust\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/runar_myklebust_2/32/2047_2.png) [@Runar\_Myklebust\_2](https://discuss.elastic.co/u/Runar_Myklebust_2)\
**Post date:** [January 17, 2012, 11:49am UTC](https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409/1 "2012-01-17T11:49:00Z")

</div>

Hi.

Im trying to configure the Search Slow Log for our Java application which  
is running Elasticsearch embedded, but Im a bit confused on how to activate  
it.  
Is it correct that the logging.yml file is not considered? Do anyone have  
an example setup for e.g tomcat if I have to set it up in the tomcat  
logging.properties? We are using java.util.logging

## mvh

Runar Myklebust

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [January 18, 2012, 9:30am UTC](https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409/2 "2012-01-18T09:30:34Z")

</div>

Why not configure it via Java API?

BTW: you'll need to configure this in elasticsearch.yml

[https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml](https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml)

Peter.

On 17 Jan., 12:49, Runar Myklebust [ru...@myklebust.me](mailto:ru...@myklebust.me) wrote:

> Hi.
> 
> Im trying to configure the Search Slow Log for our Java application which  
> is running Elasticsearch embedded, but Im a bit confused on how to activate  
> it.  
> Is it correct that the logging.yml file is not considered? Do anyone have  
> an example setup for e.g tomcat if I have to set it up in the tomcat  
> logging.properties? We are using java.util.logging
> 
> ## mvh
> 
> Runar Myklebust

---

<div class="post-metadata">

**Author:** ![Runar\_Myklebust\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/runar_myklebust_2/32/2047_2.png) [@Runar\_Myklebust\_2](https://discuss.elastic.co/u/Runar_Myklebust_2)\
**Post date:** [January 18, 2012, 11:45am UTC](https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409/3 "2012-01-18T11:45:12Z")

</div>

Hi, thanks for the answer.

But, Im not shure i understand what you mean? Configure via Java API _and_  
elasticsearch.yml? Can you ellaborate a bit?

On Wed, Jan 18, 2012 at 10:30 AM, Karussell [tableyourtime@googlemail.com](mailto:tableyourtime@googlemail.com)wrote:

> Why not configure it via Java API?
> 
> BTW: you'll need to configure this in elasticsearch.yml
> 
> [https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml](https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml)
> 
> Peter.
> 
> On 17 Jan., 12:49, Runar Myklebust [ru...@myklebust.me](mailto:ru...@myklebust.me) wrote:
> 
> > Hi.
> > 
> > Im trying to configure the Search Slow Log for our Java application which  
> > is running Elasticsearch embedded, but Im a bit confused on how to  
> > activate  
> > it.  
> > Is it correct that the logging.yml file is not considered? Do anyone have  
> > an example setup for e.g tomcat if I have to set it up in the tomcat  
> > logging.properties? We are using java.util.logging
> > 
> > ## mvh
> > 
> > Runar Myklebust

## -- mvh

Runar Myklebust

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 18, 2012, 9:22pm UTC](https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409/4 "2012-01-18T21:22:12Z")

</div>

When running embedded, the slow log is simply logged under the  
org.elasticsearch.index.search.slowlog category. The configuration for  
log4j simply states not to include the slowlog logging into the same main  
logging file, but into a separate log file. Not sure how to do that with  
tomcat.

On Wed, Jan 18, 2012 at 1:45 PM, Runar Myklebust [runar@myklebust.me](mailto:runar@myklebust.me) wrote:

> Hi, thanks for the answer.
> 
> But, Im not shure i understand what you mean? Configure via Java API _and_  
> elasticsearch.yml? Can you ellaborate a bit?
> 
> On Wed, Jan 18, 2012 at 10:30 AM, Karussell [tableyourtime@googlemail.com](mailto:tableyourtime@googlemail.com)wrote:
> 
> > Why not configure it via Java API?
> > 
> > BTW: you'll need to configure this in elasticsearch.yml
> > 
> > [https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml](https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml)
> > 
> > Peter.
> > 
> > On 17 Jan., 12:49, Runar Myklebust [ru...@myklebust.me](mailto:ru...@myklebust.me) wrote:
> > 
> > > Hi.
> > > 
> > > Im trying to configure the Search Slow Log for our Java application  
> > > which  
> > > is running Elasticsearch embedded, but Im a bit confused on how to  
> > > activate  
> > > it.  
> > > Is it correct that the logging.yml file is not considered? Do anyone  
> > > have  
> > > an example setup for e.g tomcat if I have to set it up in the tomcat  
> > > logging.properties? We are using java.util.logging
> > > 
> > > ## mvh
> > > 
> > > Runar Myklebust
> 
> ## -- mvh
> 
> Runar Myklebust

---

<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, 3:42am UTC](https://discuss.elastic.co/t/how-to-set-up-search-slow-log-for-embedded-es/6409/5 "2017-07-06T03:42:14Z")

</div>


