# Logging configuration in 0.9

**URL:** <https://discuss.elastic.co/t/logging-configuration-in-0-9/11945>\
**Category:** Elasticsearch\
**Created:** [May 14, 2013, 1:54am UTC](https://discuss.elastic.co/t/logging-configuration-in-0-9/11945 "2013-05-14T01:54:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_nozzle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/the_nozzle/32/1935_2.png) [@the\_nozzle](https://discuss.elastic.co/u/the_nozzle)\
**Post date:** [May 14, 2013, 1:54am UTC](https://discuss.elastic.co/t/logging-configuration-in-0-9/11945/1 "2013-05-14T01:54:13Z")

</div>

for some odd reason I am not getting any logs written out with 0.9 (if I  
start ES with the init.d script it dumps all of the entries to stdout) ..  
The final ES command is as follows :

java -Xms12g -Xmx12g -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC  
-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75  
-XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError  
-Delasticsearch -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid  
-Des.path.home=/usr/share/elasticsearch -cp  
:/usr/share/elasticsearch/lib/elasticsearch-0.90.0.jar:/usr/share/elasticsearch/lib/_:/usr/share/elasticsearch/lib/sigar/_  
-Des.config=/usr/share/elasticsearch/config/elasticsearch.yml  
-Des.path.conf=/usr/share/elasticsearch/config  
-Des.path.home=/usr/share/elasticsearch  
-Des.path.logs=/var/log/elasticsearch -Des.path.data=/var/lib/elasticsearch  
-Des.path.work=/tmp/elasticsearch  
-Des.path.plugins=/usr/share/elasticsearch/plugins  
org.elasticsearch.bootstrap.ElasticSearch

/usr/share/elasticsearch/config/logging.yml (I tried it both using the  
variables and hardcoding the path -  
the uncommented line should be result when those var are evaluated..):

I get the same symptoms if I use the service wrapper as well - with the  
exception that the log entries go to the wrapper log instead of what I have  
configured in logging.yml . The paths are set in every possible place I can  
think of (paths.\* in elasticsearch.yml and with the -D switch - which  
brings me to a question - which options take precedence ?)

rootLogger: INFO,file  
logger:

# log action execution errors for easier debugging

action: DEBUG

# reduce the logging for aws, too much is logged under the default INFO

com.amazonaws: WARN

# gateway

#gateway: DEBUG  
#index.gateway: DEBUG

# peer shard recovery

#index.shard.recovery: DEBUG

# discovery

#discovery: TRACE

appender:  
file:  
type: file  
#file: ${path.logs}/${cluster.name}.log  
file: /var/log/elasticsearch/cmdb-test.log  
layout:  
type: pattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

java version "1.7.0\_21"  
Java(TM) SE Runtime Environment (build 1.7.0\_21-b11)  
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

... the log directory is owned by ES process user so def. not a perms  
issue .. What am I doing wrong ? This config works fine in 19.8 ... Thanks  
for any help in advance.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [May 14, 2013, 9:53am UTC](https://discuss.elastic.co/t/logging-configuration-in-0-9/11945/2 "2013-05-14T09:53:59Z")

</div>

You should add the $ES\_HOME/config/logging.yml to your classpath

... -cp $ES\_HOME/config:...

In case, take care you have the slf4j and log4j jars in the classpath -  
they should be already in $ES\_HOME/lib.

Jörg

Am 14.05.13 03:54, schrieb the\_nozzle:

> for some odd reason I am not getting any logs written out with 0.9 (if  
> I start ES with the init.d script it dumps all of the entries to  
> stdout) .. The final ES command is as follows :
> 
> java -Xms12g -Xmx12g -Xss256k -Djava.awt.headless=true  
> -XX:+UseParNewGC -XX:+UseConcMarkSweepGC  
> -XX:CMSInitiatingOccupancyFraction=75  
> -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError  
> -Delasticsearch -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid  
> -Des.path.home=/usr/share/elasticsearch -cp  
> :/usr/share/elasticsearch/lib/elasticsearch-0.90.0.jar:/usr/share/elasticsearch/lib/_:/usr/share/elasticsearch/lib/sigar/_  
> -Des.config=/usr/share/elasticsearch/config/elasticsearch.yml  
> -Des.path.conf=/usr/share/elasticsearch/config  
> -Des.path.home=/usr/share/elasticsearch  
> -Des.path.logs=/var/log/elasticsearch  
> -Des.path.data=/var/lib/elasticsearch  
> -Des.path.work=/tmp/elasticsearch  
> -Des.path.plugins=/usr/share/elasticsearch/plugins  
> org.elasticsearch.bootstrap.Elasticsearch
> 
> /usr/share/elasticsearch/config/logging.yml (I tried it both using the  
> variables and hardcoding the path -  
> the uncommented line should be result when those var are evaluated..):
> 
> I get the same symptoms if I use the service wrapper as well - with  
> the exception that the log entries go to the wrapper log instead of  
> what I have configured in logging.yml . The paths are set in every  
> possible place I can think of (paths.\* in elasticsearch.yml and with  
> the -D switch - which brings me to a question - which options take  
> precedence ?)
> 
> rootLogger: INFO,file  
> logger:
> 
> # log action execution errors for easier debugging
> 
> action: DEBUG
> 
> # reduce the logging for aws, too much is logged under the default INFO
> 
> com.amazonaws: WARN
> 
> # gateway
> 
> #gateway: DEBUG  
> #index.gateway: DEBUG
> 
> # peer shard recovery
> 
> #index.shard.recovery: DEBUG
> 
> # discovery
> 
> #discovery: TRACE
> 
> appender:  
> file:  
> type: file  
> #file: ${path.logs}/${cluster.name [http://cluster.name/](http://cluster.name/)}.log  
> file: /var/log/elasticsearch/cmdb-test.log  
> layout:  
> type: pattern  
> conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
> 
> java version "1.7.0\_21"  
> Java(TM) SE Runtime Environment (build 1.7.0\_21-b11)  
> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
> 
> ## ... the log directory is owned by ES process user so def. not a perms issue .. What am I doing wrong ? This config works fine in 19.8 ... Thanks for any help in advance.
> 
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![the\_nozzle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/the_nozzle/32/1935_2.png) [@the\_nozzle](https://discuss.elastic.co/u/the_nozzle)\
**Post date:** [May 14, 2013, 10:39am UTC](https://discuss.elastic.co/t/logging-configuration-in-0-9/11945/3 "2013-05-14T10:39:20Z")

</div>

Yep that was the issue - Huh super odd - log4j jar was not included in the  
rpm .. And I think I tried this with an older version jar as well and had  
no output as well ... Thanks.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:36am UTC](https://discuss.elastic.co/t/logging-configuration-in-0-9/11945/4 "2017-07-06T02:36:48Z")

</div>


