title: ERROR Could not find value for key log4j.appender.error during deploying on tomcat
body: <p>my code is working fine if i right click on server and run as run on server , but when i try to deploy it on tomcat and try to  run it it is giving me below error</p>
  
  <p>log4j.properties file:</p>
  
  <pre><code>log4j.logger.Controller = INFO,error,stdout
  log4j.logger.Client = INFO,error,stdout
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.Target=System.out
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>log4j:ERROR Could not find value for key log4j.appender.error
  log4j:ERROR Could not instantiate appender named "error".
  log4j:ERROR Could not find value for key log4j.appender.error
  log4j:ERROR Could not instantiate appender named "error".
  log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  </code></pre>
  
  <p>pom.xml :</p>
  
  <pre><code>&lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
              &lt;version&gt;1.6.5&lt;/version&gt;
          &lt;/dependency&gt;
  &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
          &lt;/dependency&gt;
  &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>