title: Elasticsearch can't write to log files
body: <p>I would like to activate logs of elasticsearch .</p>
  
  <p>When I run elasticsearch binaries, I realize that I have problems with logging : the configuration cannot be loaded !</p>
  
  <p>Here is the output : </p>
  
  <pre><code>~ $ sudo /usr/share/elasticsearch/bin/elasticsearch
  Failed to configure logging...
  org.elasticsearch.ElasticsearchException: Failed to load logging configuration
      at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:117)
      at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:81)
      at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:94)
      at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:178)
      at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
  Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config
      at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
      at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
      at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:97)
      at java.nio.file.Files.readAttributes(Files.java:1686)
      at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:109)
      at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)
      at java.nio.file.Files.walkFileTree(Files.java:2602)
      at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:107)
      ... 4 more
  log4j:WARN No appenders could be found for logger (node).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  Java HotSpot(TM) Server VM warning: You have loaded library /usr/share/elasticsearch/lib/sigar/libsigar-x86-linux.so which might have disabled stack guard. The VM will try to fix the stack guard now.
  It's highly recommended that you fix the library with 'execstack -c &lt;libfile&gt;', or link it with '-z noexecstack'.
  </code></pre>
  
  <p>I am running under linuxmint 17 and using latest ES.</p>