title: log4j.properties inside a jar file
body: <p>I've made an component (lets Say SUBSCRIPTION jar) and exported it as jar file. This components includes log4j implementation and I am successfully able to generate the log file. (if ran independently).</p>
  
  <p>But, when this jar (SUBSCRIPTION JAR) is used by other project/component, the log file that I mentioned (in log4j.properties of my component) is NOT getting generated.</p>
  
  <p>How to do I make sure that log file generated, if my component is used by other project/component? (even if they implement log4j or not)</p>
  
  <p>Here is my log4j.properties</p>
  
  <pre><code>log4j.rootLogger=INFO, stdout, logfile
  log4j.logger.stdout=DEBUG, stdout
  log4j.logger.logfile=DEBUG, logfile
  
  log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.logfile.Threshold=INFO
  log4j.appender.logfile.File=logs/subscritionLogFile.log
  log4j.appender.logfile.DatePattern='.'yyyy-MM-dd
  log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
  log4j.appender.logfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5p] %c:%M:%L -%X{userLoginId} %m%n
  </code></pre>
  
  <p>Note: Using Apache Log4j framework</p>