title: How to provide a default path for Log4j file inside Linux Environment?
body: <p>a very good day to all .</p>
  
  <p>I am asking a question , out of curisioty , may be this seem to be a foolish question also .</p>
  
  <p>This is my log4j.properties file for a Application which will be in production very soon .</p>
  
  <p>log4j.rootCategory=Info, A1</p>
  
  <h1>A1 is a DailyRollingFileAppender</h1>
  
  <pre><code>log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.A1.file=D:/MyWEBLogs/MyWEB.log
  log4j.appender.A1.datePattern='.'yyyy-MM-dd
  log4j.appender.A1.append=true
  log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  log4j.appender.A1.layout.ConversionPattern=%-22d{dd/MMM/yyyy HH:mm:ss} - %m%n
  </code></pre>
  
  <p>As you can see the file path i have mentioned here is D:/MyWEBLogs/MyWEB.log .
  (This works fine under Windows Environment )</p>
  
  <p>But our Application will be taken as a war file and deployed inside Tomcat inside Linux Environment .</p>
  
  <p>Inside Linux Environemnt , we are not  sure about the path  (That is whaere this tomcat resides there ...) and also as a user we have got limited permissions , like  to create a file ---etc </p>
  
  <p>So now my question is , what should be the best default path to be put  in below line , so taht it runs  anywhere in linux Environemnt  , no matter where it is placed </p>
  
  <pre><code>log4j.appender.A1.file=D:/MyWEBLogs/MyWEB.log
  </code></pre>