Disable Tomcat registration with Spring Boot Application

I have a Spring Boot application deployed to Tomcat8

When the application starts I see the following

18-Feb-2016 15:28:12.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=
--- Many more JVM arguments 
  .   ___          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.3.1.RELEASE)
18-Feb-2016 15:28:23.328 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 10,922 ms
18-Feb-2016 15:28:23.351 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]

      

I want JVM argument to register via org.apache.catalina.startup.VersionLoggerListener

I have a logback.xml file in resources folder

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
        <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d %-5level [%thread] %logger{0}: %msg%n</pattern>
        </encoder>
    </appender>
    <root>
        <level value="ERROR" />
        <appender-ref ref="consoleAppender" />
    </root>
</configuration>

      

This seems to be happening and reduces the logging to ERROR after loading the Spring container, but after logging the JVM

Does anyone know how I can stop VersionLoggerListener logging?

0


source to share


1 answer


You can disable the VersionsLoggerListener by removing the <Listener className="org.apache.catalina.startup.VersionLoggerListener" />

server.xml from your Tomcats.



+1


source







All Articles