Fixes Tomcat logging; using Log4J2 provider.
MODIFY
distro/tomcat8/pom.xml
distro/tomcat8/pom.xml
<artifactId>apiman-distro-es</artifactId>
<type>war</type>
</dependency>
-
- <!-- tomcat default logging provider for slf4j -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- </dependency>
</dependencies>
<build>

MODIFY
gateway/platforms/war/tomcat8/api/pom.xml
gateway/platforms/war/tomcat8/api/pom.xml
<artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
</dependency>
+ <!-- Logging provider -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apiman-common-logging-log4j2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jcl</artifactId>
+ </dependency>
</dependencies>
<build>

ADD
gateway/platforms/war/tomcat8/api/src/main/resources/log4j2.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="INFO">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%msg%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>

MODIFY
gateway/platforms/war/tomcat8/gateway/pom.xml
gateway/platforms/war/tomcat8/gateway/pom.xml
<groupId>${project.groupId}</groupId>
<artifactId>apiman-gateway-platforms-war</artifactId>
</dependency>
+
+ <!-- Logging provider -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apiman-common-logging-log4j2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jcl</artifactId>
+ </dependency>
</dependencies>
<build>

ADD
gateway/platforms/war/tomcat8/gateway/src/main/resources/log4j2.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="INFO">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%msg%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>

MODIFY
manager/api/war/tomcat8/pom.xml
manager/api/war/tomcat8/pom.xml
</dependency>
<!-- Other Libs -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
</exclusions>
</dependency>
+ <!-- Logging provider -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apiman-common-logging-log4j2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jcl</artifactId>
+ </dependency>
+
<!-- Spec libs -->
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>

MODIFY
manager/ui/war/tomcat8/pom.xml
manager/ui/war/tomcat8/pom.xml
</dependency>
<!-- Other Libs -->
+
+ <!-- Logging provider -->
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apiman-common-logging-log4j2</artifactId>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jcl</artifactId>
</dependency>
</dependencies>

ADD
manager/ui/war/tomcat8/src/main/resources/log4j2.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="INFO">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%msg%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Root level="info">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>

MODIFY
pom.xml
pom.xml
<artifactId>slf4j-log4j12</artifactId>
<version>${version.org.slf4j}</version>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>${version.org.slf4j}</version>
- </dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<artifactId>log4j-core</artifactId>
<version>${version.org.apache.logging.log4j}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jcl</artifactId>
+ <version>${version.org.apache.logging.log4j}</version>
+ </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>

Fixes Tomcat logging; using Log4J2 provider.