# Change log level with embedded java

**URL:** <https://discuss.elastic.co/t/change-log-level-with-embedded-java/4274>\
**Category:** Elasticsearch\
**Created:** [April 22, 2011, 3:44am UTC](https://discuss.elastic.co/t/change-log-level-with-embedded-java/4274 "2011-04-22T03:44:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacorob](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jacorob](https://discuss.elastic.co/u/jacorob)\
**Post date:** [April 22, 2011, 3:44am UTC](https://discuss.elastic.co/t/change-log-level-with-embedded-java/4274/1 "2011-04-22T03:44:17Z")

</div>

By default the log level for elastic search appears to be set at INFO.  
I want to bump this to DEBUG. However, I don't have a configuration  
directory with the logging.yml file to configure. Is there a setting I  
can add programatically (e.g. - to the Builder settings) to change  
this?

Builder settings = ImmutableSettings.settingsBuilder();  
settings.put("index.number\_of\_shards", 5);  
settings.put("index.number\_of\_replicas", 1);  
[//settings.put](https://settings.put)("rootLogger", "DEBUG, console, file"); //something like  
this???  
settings.build();  
NodeBuilder nBuilder = nodeBuilder().settings(settings);  
nBuilder.build().start();

Thanks,  
Bob

---

<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:** [April 22, 2011, 7:49am UTC](https://discuss.elastic.co/t/change-log-level-with-embedded-java/4274/2 "2011-04-22T07:49:54Z")

</div>

When embedded, elasticsearch does not configure logging, it uses whatever logging system you use (slf4j, log4, jul). You should configure logging however you like (and the logging component names will start with org.elasticsearch).  
On Friday, April 22, 2011 at 6:44 AM, Bob wrote:

> By default the log level for Elasticsearch appears to be set at INFO.  
> I want to bump this to DEBUG. However, I don't have a configuration  
> directory with the logging.yml file to configure. Is there a setting I  
> can add programatically (e.g. - to the Builder settings) to change  
> this?
> 
> Builder settings = ImmutableSettings.settingsBuilder();  
> settings.put("index.number\_of\_shards", 5);  
> settings.put("index.number\_of\_replicas", 1);  
> [//settings.put](https://settings.put)("rootLogger", "DEBUG, console, file"); //something like  
> this???  
> settings.build();  
> NodeBuilder nBuilder = nodeBuilder().settings(settings);  
> nBuilder.build().start();
> 
> Thanks,  
> Bob

---

<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, 4:07am UTC](https://discuss.elastic.co/t/change-log-level-with-embedded-java/4274/3 "2017-07-06T04:07:52Z")

</div>


