title: How to stop Hibernate from logging in catalina.out/catalina.log
body: <p>After tomcat starts up Hibernate starts logging in <code>catalina.out</code>. </p>
  
  <p>((</p>
  
  <p>Since I've removed console handler from tomcat/conf/logging.properties, it has started logging in <code>catalina.{date}.log</code>. Using below code:</p>
  
  <pre><code>#.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
  .handlers = 1catalina.org.apache.juli.AsyncFileHandler
  </code></pre>
  
  <p>)).</p>
  
  <p>This has started to happen after I have moved from <code>logback-classic.1.1.3</code> to <code>log4j.2.7</code>.</p>
  
  <p>Below is log4j2.properties</p>
  
  <pre><code># Root logger option
  log4j.rootLogger=ERROR, file
  
   #####  ####### #     #  #####  ####### #       #######
  #     # #     # ##    # #     # #     # #       #
  #       #     # # #   # #       #     # #       #
  #       #     # #  #  #  #####  #     # #       #####
  #       #     # #   # #       # #     # #       #
  #     # #     # #    ## #     # #     # #       #
   #####  ####### #     #  #####  ####### ####### #######
  #status=error
  #name=PropertiesConfig
  
  #filters=threshold
  
  #filter.threshold.type=ThresholdFilter
  #filter.threshold.level=debug
  #appenders=console
  #appender.console.type=Console
  #appender.console.name=STDOUT
  #appender.console.layout.type=PatternLayout
  #appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  #rootLogger.level=debug
  #rootLogger.appenderRefs=stdout
  #rootLogger.appenderRef.stdout.ref=STDOUT
  
  
  
  #######   ###   #       #######
  #          #    #       #
  #          #    #       #
  #####      #    #       #####
  #          #    #       #
  #          #    #       #
  #         ###   ####### #######
  status=error
  name=PropertiesConfig
  
  property.filename=/var/log/app.log
  
  filters=threshold
  
  filter.threshold.type=ThresholdFilter
  filter.threshold.level=ERROR
  
  appenders=rolling
  
  appender.rolling.type=RollingFile
  appender.rolling.name=RollingFile
  appender.rolling.fileName=${filename}
  #appender.rolling.filePattern=/var/log/app-log-backup-%d{MM-dd-yy-HH-mm-ss}-%i.log
  appender.rolling.filePattern=/var/log/app-log-backup-%d{MM-dd-yy}-%i.log
  appender.rolling.layout.type=PatternLayout
  appender.rolling.layout.pattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  appender.rolling.policies.type=Policies
  #appender.rolling.policies.time.type= TimeBasedTriggeringPolicy
  #appender.rolling.policies.time.interval = 1
  #appender.rolling.policies.time.modulate = true
  appender.rolling.policies.size.type=SizeBasedTriggeringPolicy
  appender.rolling.policies.size.size=1MB
  appender.rolling.strategy.type=DefaultRolloverStrategy
  appender.rolling.strategy.max=20
  
  loggers=rolling,rollingORG,rollingCOM,rollingHIBERNATE
  
  logger.rolling.name=com.nm
  logger.rolling.level=ERROR
  logger.rolling.additivity=false
  logger.rolling.appenderRef.rolling.ref=RollingFile
  
  logger.rollingHIBERNATE.name=org.hibernate
  logger.rollingHIBERNATE.level=ERROR
  logger.rollingHIBERNATE.additivity=false
  logger.rollingHIBERNATE.appenderRef.rolling.ref=RollingFile
  
  logger.rollingORG.name=org
  logger.rollingORG.level=ERROR
  logger.rollingORG.additivity=false
  logger.rollingORG.appenderRef.rolling.ref=RollingFile
  
  logger.rollingCOM.name=com
  logger.rollingCOM.level=ERROR
  logger.rollingCOM.additivity=false
  logger.rollingCOM.appenderRef.rolling.ref=RollingFile
  </code></pre>
  
  <p>Below is tail of catalina.out</p>
  
  <pre><code>21-Feb-2017 18:01:28.769 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8082"]
  21-Feb-2017 18:01:28.790 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8442"]
  21-Feb-2017 18:01:28.791 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8011"]
  21-Feb-2017 18:01:28.792 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 52869 ms
  21-Feb-2017 18:05:29.870 WARN [http-nio-8442-exec-10] org.hibernate.hql.internal.ast.HqlSqlWalker.generatePositionalParameter [DEPRECATION] Encountered positional parameter near line 1, column 74.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:29.870 WARN [http-nio-8442-exec-10] org.hibernate.hql.internal.ast.HqlSqlWalker.generatePositionalParameter [DEPRECATION] Encountered positional parameter near line 1, column 91.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:29.871 WARN [http-nio-8442-exec-10] org.hibernate.hql.internal.ast.HqlSqlWalker.generatePositionalParameter [DEPRECATION] Encountered positional parameter near line 1, column 106.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.050 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 62.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.055 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 77.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.055 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 91.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.056 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 109.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.056 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 121.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.059 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 144.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.066 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 163.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.118 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 58.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.122 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 84.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  21-Feb-2017 18:05:30.123 WARN [http-nio-8442-exec-10] &lt;unknown&gt;.&lt;unknown&gt; [DEPRECATION] Encountered positional parameter near line 1, column 90.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
  </code></pre>
  
  <p>Kindly help me out.</p>
  
  <p>Thanks.</p>
  
  <pre><code>Tomcat Version : 8.0.15
  Hibernate-Core : 4.3.7.Final
  Hibernate-Commons-Annotation : 4.0.5.Final
  </code></pre>
  
  <p>Log4j2 Dependencies</p>
  
  <pre><code>compile "org.slf4j:slf4j-api:1.7.21"
  compile "org.apache.logging.log4j:log4j-slf4j-impl:2.7"
  compile "org.apache.logging.log4j:log4j-api:2.7"
  compile "org.apache.logging.log4j:log4j-core:2.7"
  </code></pre>