Code Monkey home page Code Monkey logo

tomcat-slf4j-logback's Introduction

Tomcat + SLF4J + Logback

Build Status Eclipse Project Stats Github All Releases

Tomcat SLF4J Logback is a drop in replacement to tomcat allowing full all internal logging to use our favorite slf4j/logback libraries.

MODULE PROJECTS

This is the releases repository for the Tomcat Slf4j Logback Project. Please refer to tomcat-slf4j-logback top level project for access to specific repos.

LOGBACK NOTICE

As of logback 1.1.7, it is no longer necessary to include ${catalina.home} in server.xml for logback-access. We have also realligned our code to better match logback in all ways. Throughout this documentation you will read about the prior setup and the new setup. Both should work without problems.

PRE-BUILD NOTICE

Drop in support 'server.xml' is correct on latest release. Issues existed in tomcat 8.5 and 9.0 with Jasper listener being present. Remove that listener to use older builds.

END OF LIFE NOTICE

Tomcat 6 is now End of Life. As such, we no longer support it via repo as we have released all we will for tomcat6. Please use our downloads and/or checkout project before removal was performed at f047273.

Tomcat 7 is now End of Life. As such, we no longer support it via repo as we have released all we will for tomcat7. Please use our downloads and/or clone project module for tomcat7 to build.

Tomcat 8 is now End of Life. As such, we no longer support it via repo as we have released all we will for tomcat8. Please use our downloads and/or checkout project before removal was performed at bf0d9a2.

Java Support

Java 7 through 16 is supported.

RELEASES

Releases are grouped by tomcat version. Pick the version most appropriate to your use-case. If you would like a pre-built version not listed please open an issue. Both github releases and maven central are listed below.

NOTE: The github releases all say tomcat10 (latest) but resolve to version you want per label (left side)

tomcat85 Maven central

tomcat9 Maven central

tomcat10 Maven central

** deprecated releases **

tomcat6 Maven central

tomcat7 Maven central

tomcat8 Maven central

Quick Start

If you quickly want to configure Tomcat to use Slf4J and Logback, just download latest package available from github releases into $CATALINA_HOME. Be advised doing so will replace server.xml with default version and logging valve!

Some rather old versions are not predefined for direct exploding into $CATALINA_HOME. If you would like that changed, please raise an issue.

The following directions are for manual setup.

After downloading copy as follows:

  • bin/tomcat-juli.jar to $CATALINA_HOME/bin (replacing existing tomcat-juli.jar)
  • bin/setenv.sh or bin\setenv.bat to $CATALINA_HOME/bin (this script contains proper variable name and doesn't require any changes, unless you have your own version of setenv.sh/setenv.bat script)
  • conf/logback.xml to $CATALINA_HOME/conf
  • conf/logback-access.xml to $CATALINA_HOME/conf (older version was called logback-access-localhost.xml)
  • conf/server.xml to $CATALINA_HOME/conf (this file contains proper valve and doesn't require any changes, unless you have your own version of server.xml)
  • lib/logback-core-*.jar to $CATALINA_HOME/lib
  • lib/logback-access-*.jar to $CATALINA_HOME/lib

Delete $CATALINA_HOME/conf/logging.properties. This will turn off java.util.logging completely.

If you use your own setenv.sh in $CATALINA_BASE/bin, the default one $CATALINA_HOME/bin/setenv.sh will not be used, so you have to define juli-logback.configurationFile Java property in your local setenv.sh manually. You can define it to use default configuration file like in bin/setenv.sh or to use any other located on your filesystem, just make sure that Tomcat process will have enough privileges to read it.

conf/logback.xml tries to reflect original Tomcat logging configuration. Feel free to change it.

When using your own preconfigured server.xml, the following will need applied.

Add (if using legacy logback-access-localhost.xml):

<Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true"
   filename="${catalina.home}/conf/logback-access-localhost.xml" />

note: if using logback 1.1.7+, the `${catalina.home}` can be removed

Add (if using logback defined naming logback-access.xml which allows it to auto discover)

<Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true" />

to $CATALINA_HOME/conf/server.xml.

Remove:

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
    prefix="localhost_access_log." suffix=".txt"
    pattern="%h %l %u %t &quot;%r&quot; %s %b" />

from $CATALINA_HOME/conf/server.xml.

Final step: run $CATALINA_HOME/bin/startup.sh (or startup.bat). Voila!

Git Bash

Git Bash in Windows now supports *nix based running. This was accomplished by removing undocumented logback setting file: from logback.configurationFile.

Maven Central Distribution

Maven central distribution is available. Zip binaries contain same as github releases. Below are tomcat-juli jars.

For users to get release, use dependency as follows.

<dependency>
    <groupId>com.github.tomcat-slf4j-logback</groupId>
    <artifactId>tomcat6-slf4j-logback</artifactId>
    <version>${tomcat.version}</version>
</dependency>
<dependency>
    <groupId>com.github.tomcat-slf4j-logback</groupId>
    <artifactId>tomcat7-slf4j-logback</artifactId>
    <version>${tomcat.version}</version>
</dependency>
<dependency>
    <groupId>com.github.tomcat-slf4j-logback</groupId>
    <artifactId>tomcat8-slf4j-logback</artifactId>
    <version>${tomcat.version}</version>
</dependency>
<dependency>
    <groupId>com.github.tomcat-slf4j-logback</groupId>
    <artifactId>tomcat85-slf4j-logback</artifactId>
    <version>${tomcat.version}</version>
</dependency>
<dependency>
    <groupId>com.github.tomcat-slf4j-logback</groupId>
    <artifactId>tomcat9-slf4j-logback</artifactId>
    <version>${tomcat.version}</version>
</dependency>
<dependency>
    <groupId>com.github.tomcat-slf4j-logback</groupId>
    <artifactId>tomcat10-slf4j-logback</artifactId>
    <version>${tomcat.version}</version>
</dependency>

The tomcat-slfj4-logback binary must be renamed as tomcat-juli to use within a tomcat build.

Site Page

Site page is located here

Details

This project allows using SLF4J and Logback in Apache Tomcat absolutely without the need for commons- logging, log4j, and java.util.logging.

This project's main and only goal is to allow the following:

  • redirect all org.apache.commons.logging (repackaged to org.apache.juli.logging) calls to org.slf4j (repackaged to org.apache.juli.logging.org.slf4j) - i.e. handle internal tomcat logging with slf4j and logback binding,
  • make still possible to use logback-access with logback-access.xml config - using standard functionality of logback-access,
  • make possible to use independent configuration of slf4j+logback from all web applications which may carry their own slf4j-api, logback-core, and logback-classic in their WEB-INF/lib directory.

Using only Mavens pom.xml file, proper source JARs are downloaded from maven repository and unpacked. Then all classes are refactored under org.apache.juli.logging package/subpackages and then compiled.

To allow web applications to use their own slf4j-api and logback-classic, classes used by Tomcat (particularly jcl-over-slf4j) must go into different, non-standard packages. According to Tomcat Documentation web application looks up classes in their WEB-INF/classes directory and WEB-INF/lib/*.jar files before looking them in $CATALINA_HOME/lib, but after looking them in system class loader. So Tomcat needs only to have tomcat-juli replaced with versions of jcl-over-slf4j, slf4j-api, logback-core, and logback-classic refactored into different packages.

Finally, in order to keep the classpath clean, I've chosen the method of selecting Logback's configuration file using juli-logback.configurationFile system property. It is renamed in source files during refactoring phase. Leaving standard logback.configurationFile property would cause selecting this file in all web applications despite of having dedicated, classpath-based logback.xml configuration files.

There are four JARs involved in the process transformed into org.apache.juli.logging exactly the same way as commons-logging is transformed in Tomcat's build process. It is eventually compiled into tomcat-juli.jar

  • tomcat-juli is mandatory, because it is directly referenced during Tomcat's startup process while constructing system class loader. This JAR is transformed and placed in $CATALINA_HOME/bin/tomcat-juli.jar file.:
  • jcl-over-slf4j - commons logging over SLF4J JAR.
  • slf4j-api - main SLF4J JAR.
  • logback-core - core Logback JAR.
  • logback-classic - actual SLF4J binding JAR.

Prior builds of this project contained 4 separate jars where tomcat-juli noted these in the manifest in order to avoid further touching of tomcat configuration files for security purposes. Current build results in a single tomcat-juli file and thus no longer requires this.

Installation

Launching the build requires Maven install - everything will be downloaded upon build.

Type:

mvn clean install

Tomcat versions for 7, 8.5, and 9 will build. Tomcat 6 and 8 is no longer provided on repo.

And move tomcat-juli JAR for your tomcat version from target directory to $CATALINA_HOME/bin directory.

More detailed instruction:

  1. edit file pom.xml to update tomcat/slf4j/logback dependencies
  2. run mvn clean install to build jar, javadoc, and source
  3. run mvn site to generate site page
  4. move tomcat-juli.jar from target directory to $CATALINA_HOME/bin.

After changing versions (e.g. for Tomcat), run mvn clean install.

Running Tomcat now will use default (very verbose) configuration of Logback. To change Logback's configuration, run Tomcat with the following system variable (using your favorite method of setting such variables - in catalina.sh, setenv.sh or other):

-Djuli-logback.configurationFile=file:<logback.xml location>

Alternative to allow git bash, remove the file: marker. This works on newer tomcat versions but has not been tested on older copies. It works using the bat or sh in this mode.

-Djuli-logback.configurationFile=<logback.xml location>

Configuration

Now you can configure whatever logging technology you want for your web applications. I recommend SLF4J and Logback because from now on, it will not collide with Tomcat's logging configuration.

While configuring Tomcat's logging, keep in mind that you have to use renamed packages in logback.xml config file, e.g.:

<configuration>
    <appender name="CONSOLE" class="org.apache.juli.logging.ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} %-5level {%thread} [%logger{20}] : %msg%n</pattern>
        </encoder>
    </appender>
    <logger name="org.apache.catalina.core.ContainerBase.[Catalina].[localhost]" level="INFO"
            additivity="false">
        <appender-ref ref="FILE-LOCALHOST" />
    </logger>
    <root level="INFO">
        <appender-ref ref="CONSOLE" />
    </root>
</configuration>

Configuration of logback-access doesn't require renamed packages, as the required JARs are loaded from common class loader.

Sample logback.xml reflecting the configuration from standard $CATALINA_HOME/conf/logging.properties can be found in conf/logback.xml from github [releases] (https://github.com/tomcat-slf4j-logback/tomcat-slf4j-logback/releases).

Tomcat Customization

Tomcat 6.0.x 7.0.x 8.0.x 8.5.x 9.0.x 10.0.x

After unpacking apache-tomcat-6.0.x.zip, apache-tomcat-7.0.x.zip, apache-tomcat-8.0.x.zip, apache-tomcat-8.5.x.zip apache-tomcat-9.0.x.zip, or 'apache-tomcat-10.0.x.zip' one can run Tomcat by executing $CATALINA_HOME/bin/startup.sh. This will cause running Tomcat with standard java.util.logging enabled. The standard commandline is:

"java" \
    -Djava.util.logging.config.file="$CATALINA_HOME/conf/logging.properties"
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djava.endorsed.dirs="$CATALINA_HOME/endorsed"
    -classpath "$CATALINA_HOME\bin\bootstrap.jar"
    -Dcatalina.base="$CATALINA_HOME"
    -Dcatalina.home="$CATALINA_HOME"
    -Djava.io.tmpdir="$CATALINA_HOME"
    org.apache.catalina.startup.Bootstrap start

Deleting $CATALINA_HOME/conf/logging.properties will replace -Djava.util.logging.config.file with -Dnop.

Finally we must configure our tomcat-slf4j-logback integration:

  • place our tomcat-juli JAR in $CATALINA_HOME/bin
  • add -Djuli-logback.configurationFile=<logback.xml location> to $JAVA_OPTS in setenv.sh
  • if the above add does not work, add file: before <logback.xml location>

Now Tomcat's internal logging goes through org.apache.juli.logging.org.slf4j and org.apache.juli.logging.ch.qos.logback to appenders configured in $CATALINA_HOME/conf/logback.xml (or whatever file you set juli-logback.configurationFile variable to).

The final step is to configure logback-access. Now we don't have to deal with package manipulation. Just add:

Add (if using legacy logback-access-localhost.xml):

<Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true"
    filename="${catalina.home}/conf/logback-access-localhost.xml" />

note: if using logback 1.1.7+, the `${catalina.home}` can be removed

Add (if using logback defined naming logback-access.xml which allows it to auto discover)

<Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true" />

to $CATALINA_HOME/conf/server.xml, place properly configured logback-access-localhost.xml on $CATALINA_HOME/conf and place logback-core and logback-access JARs into $CATALINA_HOME/lib. This won't cause problems with individual WARs' slf4j+logback configuration, because logback.xml is read by logback-classic which is recommended to reside in WEB-INF/lib. The only additional benefit is that WARs will see logback-core through common class loader.

Using Tomcat in Eclipse

  1. Go to Window › Preferences › Server › Runtime Environments and add your server runtime as always
  2. Go to Servers view and add server instance as always
  3. Open server definition (RMB, Open or F3) and click open launch configuration
  4. On Arguments tab in VM arguments add -Djuli-logback.configurationFile="<absolute tomcat home path>/conf/logback.xml"

That's all. While creating server runtime instance, eclipse generates VM arguments using absolute paths (no variables), so just copy the Tomcat home path and add -Djuli-logback.configurationFile argument.

Remember - Tomcat installation must be configured according to Quick Start.

tomcat-slf4j-logback's People

Contributors

dependabot-support avatar dgomesbr avatar dretzlaff avatar grgrzybek avatar hazendaz avatar kasecato avatar nike38rus avatar rmorrise avatar to-da avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tomcat-slf4j-logback's Issues

Tomcat 8.5.20

Would it kindly be possible to build a new release for recent Tomcat version 8.5.20?
Thanks in advance.

John

Unexpected behavior with tomcat 8.0.36 setup

Hi @grgrzybek ,

I'm having a hard time setting up tomcat 8.0.36 with logback. I've followed the procedure described in README.md but I'm not getting the desired results.

After starting tomcat with $CATALINA_HOME/bin/startup.sh the logging files configured in logback.xml appenders are not being created in $CATALINA_HOME/logs. Furthermore, a file named $CATALINA_HOME/logs/catalina.out is being created. Below the first 10 lines generated:

17:49:14.128 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory - Creating new class loader
17:49:14.130 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -   Including directory file:/home/andre/dev/tmp/apache-tomcat-8.0.36/lib/
17:49:14.131 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -   Including directory glob /home/andre/dev/tmp/apache-tomcat-8.0.36/lib
17:49:14.131 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/jasper.jar
17:49:14.131 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/catalina-storeconfig.jar
17:49:14.131 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/tomcat-i18n-ja.jar
17:49:14.131 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/tomcat-i18n-es.jar
17:49:14.131 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/tomcat-util.jar
17:49:14.132 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/tomcat-websocket.jar
17:49:14.132 [main] DEBUG org.apache.catalina.startup.ClassLoaderFactory -     Including glob jar file /home/andre/dev/tmp/apache-tomcat-8.0.36/lib/catalina-ha.jar

The log content seems to be produced by logback, but obviously not honoring in any way logback.xml. Any suggestions?

missing maven central dependencies

Hi,

I tried to use tomcat85-slf4j-logback:8.5.15 but it cannot be found on maven central (only 8.5.14). If I downgrade to 8.5.14, the parent tomcat-slf4j-logback:1.0.5 cannot be found (only 1.0.4). Could you please fix that? Is there an alternative repository to be used?

Tomcat 8.5.8

Maybe you could build a release for Tomcat 8.5.8. It's out since 2016-11-08.

Thanks in advance.

Oliver

Missed files

Hello guys @hazendaz

First of all thanks for your job, as always amazing 👍

And now passing to the issue I have some doubts about the the Quick Start documentation

1.- bin/tomcat-juli.jar to $CATALINA_HOME/bin (replacing existing tomcat-juli.jar)
I downloaded the tomcat-slf4j-logback but there is not any tomcat-juli.jar inside. Maybe do you refer to the file which is available as an "extra" component for tomcat. According to this page in Using Log4j section?

2.- bin/setenv.sh or bin\setenv.bat to $CATALINA_HOME/bin
Well after looking for this file, it is not exactly in bin in fact it is src/assembly/bin/ I know I am exaggerating.

3.- I cannot see the file logback-core-1.2.1.jar and either the file logback-access-1.2.1.jar, where could I find them?

Thanks in advance guys for your help

Configuration reloading

Is it possible to turn on the automatic configuration reloading? I tried to specify the 'scan="true"' attribute in logback.xml, but that's not worked for me

Consider leaving Sourceforge

Given the recent issues surrounding Sourceforge and their behaviour towards hosted projects, like bundling adware/crapware/malware with installers, hijacking accounts of inactive projects, etc, you might want to consider hosting your downloads somewhere else. Blockers like uBlock Origin have already blacklisted Sourceforge because of this.

Notepad++ has summarised the situation succinctly: https://notepad-plus-plus.org/news/notepad-plus-plus-leaves-sf.html

Here is a page that also summarises what happened and which alternatives to Sourceforge are available: http://helb.github.io/goodbye-sourceforge/

It is probably easiest to host the binary downloads directly on Github.

Build review needed

Due to profiling and other underlying changes, we need to closely review this before we start getting updates out to sourceforge. We are a little behind and this is targetted for the moment at all things current. However, due to the large scale changes recently we just need to verify that everything works as we expected before pushing anything. I had noted this on a PR since closed so that lost visibility. This brings back the visibility. I think everything is ok but wanted a second set of eyes to verify we are good.

System.out.println is not logged

With the tomcat-juli logging a println statement would be logged to the catalina.log file, but this does not happen with this implementation (tomcat-7.0.42).

Not able to handle warning SizeAndTimeBasedFNATP

I have this warning after applying resources from tomcat-juli-8.5.11-slf4j-1.7.22-logback-1.1.8.zip to pure tomcat 8.5

21:16:53,452 |-INFO in org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7006c658 - The date pattern is 'yyyyMMdd' from file name pattern '/Users/sj/Downloads/tomcat85/apache-tomcat-8.5.11/logs/archive/catalina-%d{yyyyMMdd}-%i.log.zip'.
21:16:53,452 |-INFO in org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7006c658 - Roll-over at midnight.
21:16:53,457 |-INFO in org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7006c658 - Setting initial period to Sun Feb 26 21:16:53 EET 2017
21:16:53,458 |-WARN in org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7006c658 - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead

Logback Classic Shaded Socket Appender doesn't work with Lilith

Hi,
I'm trying to use Lilith (http://lilith.huxhorn.de/) to receive Tomcat logging events. I've configured the access log and the standard log to use Logback's SocketAppender. This works fine with the Access Log but fails with the standard because the log event is serialised with the shaded class name, not with the original class name.

Error message in Lilith is:

Exception (java.lang.ClassNotFoundException: 'org.apache.juli.logging.ch.qos.logback.classic.spi.LoggingEventVO') while reading events. Adding eventWrapper with empty event and stopping...

Is there any possible way of serialising the event with the original class name instead of the shaded name?

Alternatively, Lilith provides JSON and XML appenders that could be used instead but they have a lot of dependencies that would probably need shading as well. - A potential solution but not ideal.

Any other ideas?
Thanks

Cleanup readme

Old issue items probably don't need noted any longer as no one should really be using old builds as with anything tomcat, nearly all old tomcats are vulnerable.

Also there are notes referring to my personal repo location, those should be set to the project here. Data is the same but points it to the group location instead of my personal.

About the tomcat log changing when using tomcat-slf4j-logback

The tomcat defalut log configuration has the level Fine , but when i add logback for tomcat log accroding to tomcat-slf4j-logback, we found that we useed the logback.xml to config the tomcat catalina.log,localhost.log and other logs , all the level for these tomcat log are INFO,I kown this may caused that logback didn't has the level FINE. But when we config completed as tomcat-slf4j-logback tutorials and start the tomcat , we find we missing some tomcat log which shoud be have . I want to know tomcat defalut log has more level relative to logback ,such as level FINE, whether we
will lose some tomcat log which the log level logback not has ?

Rework project into multi module build that will build all at once

Due to changes in various tomcat versions it is getting more complicated to house everything as a single build file and trying to profile it. As such, switching to a multimodule build will allow a single build to build all deliverables at once. This will improve the release process as well.

Release to central zip is bad

due to #125 which allowed release of bundles to maven central it broke all future builds from including in the zip file tomcat-juli as our version. This is a result of the assembly running before the shade plugin. To fix this the order needs changed in all modules. We won't be able to address the issue in central but ongoing these should be right and fall back is github releases which happened to have occurred before this issue was introduced.

Class org.apache.juli.ClassLoaderLogManager is missing

Hello,

First of all I found jms-1.1.jar in JBoss maven repository http://repository.jboss.org/maven2/javax/jms/jms/1.1/.

I've just tried it with tomcat 7.0.6 and it works like a charm. However when I try to stop tomcat I get this NoClassDefFoundError:

00:04:51.518 [Thread-3] INFO org.apache.coyote.ajp.AjpProtocol - Stopping ProtocolHandler ["ajp-bio-8009"]
00:04:51.519 [Thread-3] DEBUG o.apache.tomcat.util.net.JIoEndpoint - About to unlock socket for:localhost/127.0.0.1:8009
00:04:51.519 [Thread-3] DEBUG o.apache.tomcat.util.net.JIoEndpoint - Socket unlock completed for:localhost/127.0.0.1:8009
00:04:51.519 [Thread-3] DEBUG o.apache.catalina.util.LifecycleBase - Setting state for [org.apache.catalina.connector.MapperListener@418bbf55] to [STOPPING_PREP]
00:04:51.519 [Thread-3] DEBUG o.apache.catalina.util.LifecycleBase - Setting state for [org.apache.catalina.connector.MapperListener@418bbf55] to [STOPPING]
00:04:51.520 [Thread-3] DEBUG o.apache.catalina.util.LifecycleBase - Setting state for [org.apache.catalina.connector.MapperListener@418bbf55] to [STOPPED]
00:04:51.520 [Thread-3] DEBUG o.apache.catalina.util.LifecycleBase - Setting state for [Connector[AJP/1.3-8009]] to [STOPPED]
00:04:51.520 [Thread-3] DEBUG o.apache.catalina.util.LifecycleBase - Setting state for [StandardService[Catalina]] to [STOPPED]
00:04:51.520 [Thread-3] DEBUG o.apache.catalina.util.LifecycleBase - Setting state for [StandardServer[8005]] to [STOPPED]
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/apache/juli/ClassLoaderLogManager
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:828)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more

Move to organization 'tomcat-slf4j-logback'

@grgrzybek I think we should move this to an organization. Simply 'tomcat-slf4j-logback' should do it. I can do majority of work then can invite you over. At that point you would need to transfer ownership over. What do you think?

This approach in turn can result in groupId for maven central releases to change to 'com.github.tomcat-slf4j-logback'. It additionally will give me a bit of extra access so I can do things like properly hook this to travis CI and versioneye rather than off my personal account. That in turn allows some additional build configurations to occur like most recent commit I added to auto release snapshots to sonatype (tied to root repo).

ch.qos.logback.core.util.IncompatibleClassException starting tomcat 9.0.2

Tomcat Version: 9.0.2
We are using slf4j in the webapp and we followed the guide on the github project but when we start tomcat we get a IncompatibleClassException

Inside the apache-tomcat-9.0.2/lib/

bash-4.2$ ll /opt/apache-tomcat-9.0.2/lib/
total 9916
-rw-rw-rw- 1 tomcat tomcat   12400 Jun 21 16:35 annotations-api.jar
-rw-rw-rw- 1 tomcat tomcat   54234 Jun 21 16:35 catalina-ant.jar
-rw-rw-rw- 1 tomcat tomcat  119168 Jun 21 16:35 catalina-ha.jar
-rw-rw-rw- 1 tomcat tomcat 1610515 Jun 21 16:35 catalina.jar
-rw-rw-rw- 1 tomcat tomcat   74886 Jun 21 16:35 catalina-storeconfig.jar
-rw-rw-rw- 1 tomcat tomcat  287047 Jun 21 16:35 catalina-tribes.jar
-rw-r--r-- 1 tomcat tomcat   61829 Aug  6 13:48 commons-logging-1.2.jar
-rw-rw-rw- 1 tomcat tomcat 2450404 Jun 21 16:35 ecj-4.6.3.jar
-rwxr-xr-x 1 tomcat tomcat 1347501 Aug  1 11:34 ehcache-core-2.6.11.jar
-rw-rw-rw- 1 tomcat tomcat   81580 Jun 21 16:35 el-api.jar
-rw-rw-rw- 1 tomcat tomcat  163672 Jun 21 16:35 jasper-el.jar
-rw-rw-rw- 1 tomcat tomcat  547145 Jun 21 16:35 jasper.jar
-rw-rw-rw- 1 tomcat tomcat   26870 Jun 21 16:35 jaspic-api.jar
-rw-rw-rw- 1 tomcat tomcat   61763 Jun 21 16:35 jsp-api.jar
-rw-r--r-- 1 tomcat tomcat  107064 Aug  2 14:44 logback-access-1.2.3.jar
-rw-r--r-- 1 tomcat tomcat  290339 Aug  9 10:26 logback-classic-1.2.3.jar
-rw-r--r-- 1 tomcat tomcat  471901 Aug  9 09:39 logback-core-1.2.3.jar
-rw-rw-rw- 1 tomcat tomcat  277812 Jun 21 16:35 servlet-api.jar
-rw-r--r-- 1 tomcat tomcat   41203 Aug  2 09:22 slf4j-api-1.7.25.jar
-rw-rw-rw- 1 tomcat tomcat   10700 Jun 21 16:35 tomcat-api.jar
-rw-rw-rw- 1 tomcat tomcat  802899 Jun 21 16:35 tomcat-coyote.jar
-rw-rw-rw- 1 tomcat tomcat  251938 Jun 21 16:35 tomcat-dbcp.jar
-rw-rw-rw- 1 tomcat tomcat   65453 Jun 21 16:35 tomcat-i18n-es.jar
-rw-rw-rw- 1 tomcat tomcat   39392 Jun 21 16:35 tomcat-i18n-fr.jar
-rw-rw-rw- 1 tomcat tomcat   42275 Jun 21 16:35 tomcat-i18n-ja.jar
-rw-rw-rw- 1 tomcat tomcat  145142 Jun 21 16:35 tomcat-jdbc.jar
-rw-rw-rw- 1 tomcat tomcat   34541 Jun 21 16:35 tomcat-jni.jar
-rw-rw-rw- 1 tomcat tomcat  136862 Jun 21 16:35 tomcat-util.jar
-rw-rw-rw- 1 tomcat tomcat  205736 Jun 21 16:35 tomcat-util-scan.jar
-rw-rw-rw- 1 tomcat tomcat  224847 Jun 21 16:35 tomcat-websocket.jar
-rw-rw-rw- 1 tomcat tomcat   36829 Jun 21 16:35 websocket-api.jar

Output of mvn dependency:tree

[INFO] Reactor Build Order:
[INFO] 
[INFO] ORTS Parent pom                                                    [pom]
[INFO] ORTS-XMLBeans                                                      [jar]
[INFO] ORTS web application                                               [war]
[INFO] 
[INFO] ------------------< com.cliqdigital.orts:orts-parent >------------------
[INFO] Building ORTS Parent pom 3.6.0-SNAPSHOT                            [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ orts-parent ---
[INFO] com.cliqdigital.orts:orts-parent:pom:3.6.0-SNAPSHOT
[INFO] 
[INFO] -----------------< com.cliqdigital.orts:ORTS-XMLBeans >-----------------
[INFO] Building ORTS-XMLBeans 3.6.0-SNAPSHOT                              [2/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ ORTS-XMLBeans ---
[INFO] com.cliqdigital.orts:ORTS-XMLBeans:jar:3.6.0-SNAPSHOT
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.3:compile
[INFO] +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] \- org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:1.11.1:compile
[INFO] 
[INFO] -------------------< com.cliqdigital.orts:ORTS-web >--------------------
[INFO] Building ORTS web application 3.6.0-SNAPSHOT                       [3/3]
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ ORTS-web ---
[INFO] com.cliqdigital.orts:ORTS-web:war:3.6.0-SNAPSHOT
[INFO] +- com.cliqdigital.orts:ORTS-XMLBeans:jar:3.6.0-SNAPSHOT:compile
[INFO] |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  \- org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:1.11.1:compile
[INFO] +- javax.enterprise:cdi-api:jar:2.0:provided
[INFO] |  +- javax.el:javax.el-api:jar:3.0.0:provided
[INFO] |  +- javax.interceptor:javax.interceptor-api:jar:1.2:provided
[INFO] |  \- javax.inject:javax.inject:jar:1:provided
[INFO] +- javax.annotation:jsr250-api:jar:1.0:provided
[INFO] +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] +- org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.3:compile
[INFO] +- commons-io:commons-io:jar:2.6:compile
[INFO] +- commons-codec:commons-codec:jar:1.11:compile
[INFO] +- commons-validator:commons-validator:jar:1.6:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] |  +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.4:compile
[INFO] |  \- org.apache.httpcomponents:httpcore:jar:4.4.7:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.3.0:compile
[INFO] |  +- com.mchange:c3p0:jar:0.9.5.2:compile
[INFO] |  +- com.mchange:mchange-commons-java:jar:0.2.11:compile
[INFO] |  \- com.zaxxer:HikariCP-java6:jar:2.3.13:compile
[INFO] +- log4j:log4j:jar:1.2.17:provided
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.easymock:easymock:jar:3.5.1:test
[INFO] |  \- org.objenesis:objenesis:jar:2.6:test
[INFO] +- org.easymock:easymockclassextension:jar:3.2:test
[INFO] +- cglib:cglib-nodep:jar:3.2.5:test
[INFO] +- org.springframework:spring-test:jar:4.3.13.RELEASE:test
[INFO] +- org.springframework:spring-beans:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.ws:spring-ws-core:jar:3.0.0.RELEASE:compile
[INFO] |  \- org.springframework.ws:spring-xml:jar:3.0.0.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-core:jar:4.3.13.RELEASE:compile
[INFO] |  +- org.springframework:spring-messaging:jar:4.3.13.RELEASE:compile
[INFO] |  \- org.springframework.retry:spring-retry:jar:1.1.3.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-http:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-xml:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-ws:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-jmx:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-jms:jar:4.3.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-jms:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-amqp:jar:4.3.13.RELEASE:compile
[INFO] |  \- org.springframework.amqp:spring-rabbit:jar:1.6.11.RELEASE:compile
[INFO] |     +- com.rabbitmq:http-client:jar:1.0.0.RELEASE:compile
[INFO] |     +- org.springframework.amqp:spring-amqp:jar:1.6.11.RELEASE:compile
[INFO] |     \- com.rabbitmq:amqp-client:jar:3.6.5:compile
[INFO] +- org.springframework.security:spring-security-config:jar:4.2.3.RELEASE:compile
[INFO] |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-core:jar:4.2.3.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-file:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.integration:spring-integration-jpa:jar:4.3.13.RELEASE:compile
[INFO] +- org.codehaus.fabric3.api:commonj:jar:1.1.1:compile
[INFO] +- commons-jxpath:commons-jxpath:jar:1.3:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1:compile
[INFO] +- joda-time:joda-time:jar:2.2:compile
[INFO] +- org.powermock:powermock-module-junit4:jar:1.7.3:test
[INFO] |  \- org.powermock:powermock-module-junit4-common:jar:1.7.3:test
[INFO] |     +- org.powermock:powermock-reflect:jar:1.7.3:test
[INFO] |     \- org.powermock:powermock-core:jar:1.7.3:test
[INFO] +- org.powermock:powermock-api-easymock:jar:1.7.3:test
[INFO] |  \- org.powermock:powermock-api-support:jar:1.7.3:test
[INFO] +- mysql:mysql-connector-java:jar:5.1.45:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.0:provided
[INFO] +- net.sf.ehcache:ehcache-core:jar:2.6.11:provided
[INFO] +- org.apache.xbean:xbean-spring:jar:4.6:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.25:provided
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.25:provided
[INFO] +- ch.qos.logback:logback-classic:jar:1.2.3:provided
[INFO] +- ch.qos.logback:logback-core:jar:1.2.3:provided
[INFO] +- ch.qos.logback:logback-access:jar:1.2.3:provided
[INFO] +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] |  \- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] +- org.hibernate:hibernate-core:jar:5.2.12.Final:compile
[INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile
[INFO] |  +- org.jboss:jandex:jar:2.0.3.Final:compile
[INFO] |  \- com.fasterxml:classmate:jar:1.3.0:compile
[INFO] +- org.mockito:mockito-all:jar:2.0.2-beta:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.7.3:test
[INFO] |  \- org.powermock:powermock-api-mockito-common:jar:1.7.3:test
[INFO] +- trove:trove:jar:2.1.1:test
[INFO] +- cglib:cglib:jar:3.2.5:test
[INFO] |  +- org.ow2.asm:asm:jar:5.2:test
[INFO] |  \- org.apache.ant:ant:jar:1.9.6:test
[INFO] |     \- org.apache.ant:ant-launcher:jar:1.9.6:test
[INFO] +- org.hsqldb:hsqldb:jar:2.3.1:test
[INFO] +- xmlunit:xmlunit:jar:1.3:test
[INFO] +- org.jvnet.jaxb2_commons:jaxb2-basics:jar:0.6.5:compile
[INFO] |  +- org.jvnet.jaxb2_commons:jaxb2-basics-tools:jar:0.6.5:compile
[INFO] |  |  \- commons-lang:commons-lang:jar:2.2:compile
[INFO] |  \- com.google.code.javaparser:javaparser:jar:1.0.8:compile
[INFO] +- javax.xml.ws:jaxws-api:jar:2.3.0:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] |  \- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
[INFO] +- com.sun.xml.ws:jaxws-rt:jar:2.3.0:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3:compile
[INFO] |  +- javax.jws:jsr181-api:jar:1.0-MR1:compile
[INFO] |  +- com.sun.xml.bind:jaxb-core:jar:2.3.0:compile
[INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.3.0:compile
[INFO] |  +- com.sun.xml.ws:policy:jar:2.7.2:compile
[INFO] |  +- org.glassfish.gmbal:gmbal-api-only:jar:3.1.0-b001:compile
[INFO] |  |  \- org.glassfish.external:management-api:jar:3.0.0-b012:compile
[INFO] |  +- org.jvnet.staxex:stax-ex:jar:1.7.8:compile
[INFO] |  +- com.sun.xml.stream.buffer:streambuffer:jar:1.5.4:compile
[INFO] |  +- org.jvnet.mimepull:mimepull:jar:1.9.7:compile
[INFO] |  +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.13:compile
[INFO] |  +- org.glassfish.ha:ha-api:jar:3.1.9:compile
[INFO] |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:runtime
[INFO] |  +- org.codehaus.woodstox:stax2-api:jar:3.1.4:runtime
[INFO] |  \- com.sun.org.apache.xml.internal:resolver:jar:20050927:compile
[INFO] +- com.sun.xml.ws:jaxws-tools:jar:2.3.0:compile
[INFO] |  +- com.sun.xml.bind:jaxb-xjc:jar:2.3.0:compile
[INFO] |  \- com.sun.xml.bind:jaxb-jxc:jar:2.3.0:compile
[INFO] +- com.sun.xml.parsers:jaxp-ri:jar:1.4.5:compile
[INFO] |  \- javax.xml.parsers:jaxp-api:jar:1.4.5:compile
[INFO] +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.4.0:provided
[INFO] +- org.apache.xmlrpc:xmlrpc-client:jar:3.1.3:compile
[INFO] |  \- org.apache.xmlrpc:xmlrpc-common:jar:3.1.3:compile
[INFO] |     \- org.apache.ws.commons.util:ws-commons-util:jar:1.0.2:compile
[INFO] +- commons-net:commons-net:jar:3.6:compile
[INFO] +- com.sun.istack:istack-commons-runtime:jar:3.0.5:test
[INFO] +- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- org.mortbay.jetty:jetty:jar:6.1.5:test
[INFO] |  +- org.mortbay.jetty:jetty-util:jar:6.1.5:test
[INFO] |  \- org.mortbay.jetty:servlet-api-2.5:jar:6.1.5:test
[INFO] +- com.sun.jersey:jersey-client:jar:1.16:compile
[INFO] |  \- com.sun.jersey:jersey-core:jar:1.16:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.8.13:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.6:compile
[INFO] +- org.antlr:antlr4-runtime:jar:4.5.3:compile
[INFO] +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] \- org.mockito:mockito-core:jar:2.18.0:test
[INFO]    +- net.bytebuddy:byte-buddy:jar:1.8.3:test
[INFO]    \- net.bytebuddy:byte-buddy-agent:jar:1.8.3:test
[INFO] ------------------------------------------------------------------------

logback.xml

<configuration>

    <property name="max.retention.days" value="60" />

    <appender name="CONSOLE" class="org.apache.juli.logging.ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} %-5level {%thread} [%logger{20}] : %msg%n</pattern>
        </encoder>
    </appender>


    <appender name="FILE" class="org.apache.juli.logging.ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${catalina.base}/logs/orts.log</file>
		<encoder>
			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
		</encoder>

		<rollingPolicy class="org.apache.juli.logging.ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${catalina.base}/logs/orts.%d{yyyy-MM-dd}.log</fileNamePattern>
		</rollingPolicy>
	</appender>



    <appender name="FILE-CATALINA" class="org.apache.juli.logging.ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${catalina.base}/logs/catalina.log</file>
        <append>true</append>
        <encoder>
            <charset>utf-8</charset>
            <pattern>%d{HH:mm:ss.SSS} %-5level {%thread} [%logger{40}] : %msg%n</pattern>
        </encoder>
        <rollingPolicy class="org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${catalina.base}/logs/archive/catalina-%d{yyyyMMdd}-%i.log.zip</fileNamePattern> 
            <maxHistory>${max.retention.days}</maxHistory>
            <cleanHistoryOnStart>true</cleanHistoryOnStart>
            <maxFileSize>20MB</maxFileSize>
        </rollingPolicy>
    </appender>

    <appender name="FILE-LOCALHOST" class="org.apache.juli.logging.ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${catalina.base}/logs/localhost.log</file>
        <append>true</append>
        <encoder>
            <charset>utf-8</charset>
            <pattern>%d{HH:mm:ss.SSS} %logger{0} {%thread} %level : %msg%n</pattern>
        </encoder>
        <rollingPolicy class="org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${catalina.base}/logs/archive/localhost-%d{yyyyMMdd}-%i.log.zip</fileNamePattern> 
            <maxHistory>${max.retention.days}</maxHistory>
            <maxFileSize>20MB</maxFileSize>
        </rollingPolicy>
    </appender>

    <appender name="FILE-MANAGER" class="org.apache.juli.logging.ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${catalina.base}/logs/manager.log</file>
        <append>true</append>
        <encoder>
            <charset>utf-8</charset>
            <pattern>%d{HH:mm:ss.SSS} %logger{0} {%thread} %level : %msg%n</pattern>
        </encoder>
        <rollingPolicy class="org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${catalina.base}/logs/archive/manager-%d{yyyyMMdd}-%i.log.zip</fileNamePattern> 
            <maxHistory>${max.retention.days}</maxHistory>
            <maxFileSize>20MB</maxFileSize>
        </rollingPolicy>
    </appender>

    <appender name="FILE-HOST-MANAGER" class="org.apache.juli.logging.ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${catalina.base}/logs/host-manager.log</file>
        <append>true</append>
        <encoder>
            <charset>utf-8</charset>
            <pattern>%d{HH:mm:ss.SSS} %logger{0} {%thread} %level : %msg%n</pattern>
        </encoder>
        <rollingPolicy class="org.apache.juli.logging.ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${catalina.base}/logs/archive/host-manager-%d{yyyyMMdd}-%i.log.zip</fileNamePattern> 
            <maxHistory>${max.retention.days}</maxHistory>
            <maxFileSize>20MB</maxFileSize>
        </rollingPolicy>
    </appender>

    <logger name="org.apache.catalina" level="INFO" additivity="false">
        <appender-ref ref="FILE-CATALINA" />
    </logger>

    <logger name="org.apache.catalina.core.ContainerBase.[Catalina]" level="DEBUG" additivity="false">
        <appender-ref ref="FILE-LOCALHOST" />
    </logger>

    <logger name="org.apache.catalina.core.ContainerBase.[Catalina].[/manager]" level="INFO"
        additivity="false">
        <appender-ref ref="FILE-MANAGER" />
    </logger>

    <logger name="org.apache.catalina.core.ContainerBase.[Catalina].[/host-manager]" level="INFO"
        additivity="false">
        <appender-ref ref="FILE-HOST-MANAGER" />
    </logger>

    <logger name="com.cliqdigital" level="DEBUG" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.apache.juli" level="DEBUG" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.springframework" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <root level="INFO">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="FILE" />
    </root>

</configuration>

server.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />

    <!--Resource name="jdbc/FSPDS" auth="Container" type="javax.sql.DataSource"
               maxTotal="100" maxIdle="30" maxWaitMillis="10000"
               username="root" password="" driverClassName="com.mysql.jdbc.Driver"
               url="jdbc:mysql://adezorzi.dev.cliqdigital.com:3306/Q?zeroDateTimeBehavior=convertToNull&amp;jdbcCompliantTruncation=false"/>

    <Resource name="jdbc/ORTSMasterDS" auth="Container" type="javax.sql.DataSource"
               maxTotal="100" maxIdle="30" maxWaitMillis="10000"
               username="root" password="" driverClassName="com.mysql.jdbc.Driver"
               url="jdbc:mysql://adezorzi.dev.cliqdigital.com:3306/Q?zeroDateTimeBehavior=convertToNull&amp;jdbcCompliantTruncation=false"/-->

  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true" />

      </Host>
    </Engine>
  </Service>
</Server>

setenv.sh

JAVA_OPTS="$JAVA_OPTS -Djuli-logback.configurationFile=$CATALINA_HOME/conf/logback.xml"

$CATALINA_HOME/conf/logging.properties is been deleted

And this is the Exception we get:

10:42:07.734 INFO  {main} [o.a.c.h.Http11NioProtocol] : Initializing ProtocolHandler ["http-nio-8080"]
10:42:07.743 INFO  {main} [o.a.t.u.n.NioSelectorPool] : Using a shared selector for servlet write/read
10:42:07.748 INFO  {main} [o.a.c.a.AjpNioProtocol] : Initializing ProtocolHandler ["ajp-nio-8009"]
10:42:07.749 INFO  {main} [o.a.t.u.n.NioSelectorPool] : Using a shared selector for servlet write/read
10:42:10.090 INFO  {main} [o.a.j.s.TldScanner] : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
10:42:10,111 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
10:42:10,111 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
10:42:10,111 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/opt/apache-tomcat-9.0.2/conf/logback.xml]
10:42:10,117 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
10:42:10,117 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [org.apache.juli.logging.ch.qos.logback.core.ConsoleAppender]
10:42:10,118 |-ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not create an Appender of type [org.apache.juli.logging.ch.qos.logback.core.ConsoleAppender]. ch.qos.logback.core.util.IncompatibleClassException
	at ch.qos.logback.core.util.IncompatibleClassException
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:58)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:45)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:34)
	at 	at ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:52)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at 	at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addStatus(StatusViaSLF4JLoggerFactory.java:32)
	at 	at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addInfo(StatusViaSLF4JLoggerFactory.java:20)
	at 	at ch.qos.logback.classic.servlet.LogbackServletContainerInitializer.onStartup(LogbackServletContainerInitializer.java:32)
	at 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5094)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:740)
	at 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:716)
	at 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
	at 	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:619)
	at 	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1829)
	at 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
	at 	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:530)
	at 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
	at 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1575)
	at 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
	at 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
	at 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
	at 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
	at 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:964)
	at 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
	at 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
	at 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
	at 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.startup.Catalina.start(Catalina.java:671)
	at 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at 	at java.lang.reflect.Method.invoke(Method.java:497)
	at 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
	at 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
10:42:10,118 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@19:98 - ActionException in Action for tag [appender] ch.qos.logback.core.joran.spi.ActionException: ch.qos.logback.core.util.IncompatibleClassException
	at ch.qos.logback.core.joran.spi.ActionException: ch.qos.logback.core.util.IncompatibleClassException
	at 	at ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:76)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at 	at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addStatus(StatusViaSLF4JLoggerFactory.java:32)
	at 	at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addInfo(StatusViaSLF4JLoggerFactory.java:20)
	at 	at ch.qos.logback.classic.servlet.LogbackServletContainerInitializer.onStartup(LogbackServletContainerInitializer.java:32)
	at 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5094)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:740)
	at 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:716)
	at 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
	at 	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:619)
	at 	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1829)
	at 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
	at 	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:530)
	at 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
	at 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1575)
	at 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
	at 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
	at 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
	at 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
	at 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:964)
	at 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
	at 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
	at 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
	at 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
	at 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at 	at org.apache.catalina.startup.Catalina.start(Catalina.java:671)
	at 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at 	at java.lang.reflect.Method.invoke(Method.java:497)
	at 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
	at 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
Caused by: ch.qos.logback.core.util.IncompatibleClassException
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:58)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:45)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:34)
	at 	at ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:52)
	at 	... 58 common frames omitted

We have the suspect that the library that are colliding are:

bash-4.2$ grep -l AppenderAction.class /opt/apache-tomcat-9.0.2/lib/*.jar
/opt/apache-tomcat-9.0.2/lib/logback-core-1.2.3.jar
bash-4.2$ grep -l AppenderAction.class /opt/apache-tomcat-9.0.2/bin/*.jar
/opt/apache-tomcat-9.0.2/bin/tomcat-juli.jar

So logback-core-1.2.3.jar and tomcat-juli.jar containing both AppenderAction.class

What happens to Console Output?

By default, all console output is logged into a file called logs\catalina.out.

If I'm using your library, any method to relay those logs to default catalina.log.* files?

If it still gonna go to catalina.out, can it be rolled?

ivywork.xml does not honour build.properties

I've specified log4j.version=1.7.0 in build.properties.default but ivywork.xml has it hardcoded as version 1.7.2.
The build failed due to this reason.

It would be ideal if the build script would create ivywork.xml on the fly, instead of relying on something already there.

Thanks :)

Not possible to add access logging appenders?

I'm trying to send our access logs to a Graylog instance with the following configuration:

...
<appender name="GELF" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender">
        <host>udp:graylog.dev.company.com</host>
        <version>1.1</version>
        <extractStackTrace>true</extractStackTrace>
        <additionalFields>
            service=application-tomcat-access,version=3.40.5,organization=test,cluster=test
        </additionalFields>
    </appender>

    <appender name="ASYNC_GELF" class="ch.qos.logback.classic.AsyncAppender">
        <neverBlock>true</neverBlock>
        <queueSize>512</queueSize>
        <appender-ref ref="GELF" />
    </appender>

    <appender-ref ref="ACCESS-LOG" />
    <appender-ref ref="ASYNC_GELF" />

However the <appender-ref ref="ASYNC_GELF" /> seems to be completely ignored for access-logging but works for the application hosted by Tomcat. What am I missing?

On a related note I can't find any documentation for logback where the <appender-ref> tag is used/allowed directly under the <configuration> tag. Is this using some custom solution?

Split modules into separate projects

We need to break this into multiple projects. The tomcat releases are never in sync these day so it's hard to just wait to all catch up before releases. Also the parent ends up getting changed in the current way for mostly no reason. so we need to split this from a multi module build into separate projects. This also would alot for bringing back tomcat 6 since it got some updates we since have ignored.

Tomcat 7.0.70

Hello,

the newest tomcat package is missing.
Should 7.0.69 work with the newer one?

Thanks!

Difficulty with proxy configuration

I had difficulties trying to build the project from the office.
The problem is related to proxy configuration. I'm used to face similar difficulties.

I found 4 solutions for the problem, as explained below:

  1. Pass option -autoproxy to Ant. Example
    $ ant -v -autoproxy clean cleanCache dist
  2. Define propertis when you call Java or define then via JAVA_OPTS. Example:
    $ export JAVA_OPTS="-Dhttp.proxyHost=webcache.mydomain.com -Dhttp.proxyPort=8080"
    $ ant -v dist
  3. Similar to (2), but you will be defining ANT_OPTS instead
    $ export ANT_OPTS="-Dhttp.proxyHost=webcache.mydomain.com -Dhttp.proxyPort=8080"
    $ ant -v dist
  4. Employ setproxy task in your build.xml. Example:
    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" />

Turned out that only option (4) worked for me.
All other options failed. I even installed recent versions of Ant and the JDK. Nothing.

In the Ant website there's a suggestion about how proxy configuration could be included in the configuration. More details: http://ant.apache.org/manual/proxy.html

if you had a chance to implement, it would be nice to have.

Thanks a lot ;)

Deploy Artifacts to Maven Central

While direct usage probably would not benefit from this there are instances were certain companies are enforcing getting artifacts only out of central. This would assist in those situations to ensure we do not need to manually load to a nexus repo. I do have a sonatype account and can move things there if that would help in getting that going.

Support logaback 1.2.x

per #144, additonal item discovery

2017-02-26 22:35:16,811[ost-startStop-1]  [ERROR] [o.a.c.startup.ContextConfig 1624]    - Failed to detect ServletContainerInitializers for context with name [/docs]
java.io.IOException: java.lang.ClassNotFoundException: ch.qos.logback.classic.servlet.LogbackServletContainerInitializer
	at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:192)
	at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:159)
	at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1622)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1135)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.servlet.LogbackServletContainerInitializer
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:188)
	... 18 common frames omitted

Maven 3.1.1 requirement?

I'm using Maven 3.0.5 and I cannot build your latest source, I am seeing this issue:

[DEBUG] Configuring mojo org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.3.1, parent: sun.misc.Launcher$AppClassLoader@32edeea8]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce' with basic configurator -->
[DEBUG]   (s) fail = true
[DEBUG]   (s) failFast = false
[DEBUG]   (f) ignoreCache = false
[DEBUG]   (s) version = [3.1.1,)
[DEBUG]   (s) rules = [org.apache.maven.plugins.enforcer.RequireMavenVersion@5d0e47b3]
[DEBUG]   (s) skip = false
[DEBUG]   (s) project = MavenProject: org.grgrzybek:tomcat-slf4j-logback:1.1.0 @ /home/mondain/workspace/github/tomcat-slf4j-logback/pom.xml
[DEBUG]   (s) session = org.apache.maven.execution.MavenSession@28f9533
[DEBUG] -- end configuration --
[DEBUG] Executing rule: org.apache.maven.plugins.enforcer.RequireMavenVersion
[DEBUG] Rule org.apache.maven.plugins.enforcer.RequireMavenVersion is cacheable.
[DEBUG] Detected Maven Version: 3.0.5
[DEBUG] Adding failure due to exception
org.apache.maven.enforcer.rule.api.EnforcerRuleException: Detected Maven Version: 3.0.5 is not in the allowed range [3.1.1,).
    at org.apache.maven.plugins.enforcer.AbstractVersionEnforcer.enforceVersion(AbstractVersionEnforcer.java:106)
    at org.apache.maven.plugins.enforcer.RequireMavenVersion.execute(RequireMavenVersion.java:51)
    at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:177)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Detected Maven Version: 3.0.5 is not in the allowed range [3.1.1,).

LOGGING_MANAGER=-Dnop breaks per webapp behavior or JUL

The advised setting of adding LOGGING_MANAGER=-Dnopto setenv.sh, which causes the -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager parameter to be omitted from Tomcat's command line, will make java.util.logging's fall back to using java.util.logging.LogManager as its manager, which isn't webapp aware. This causes issues when each webapp tries to configure jul by itself (by adding handlers, for example).

I was attempting to use the jul-to-slf4j bridge to make jul logging go through SLF4J and then through Logback, in order to route jul logs that are emitted by libraries that I don't control (things like JAX-WS and Jersey) through Logback as well. Each webapp already configures its own Logback with their own parameters and logging files, which they already normally use through SLF4J, but also initialize the jul-to-slf4j bridge by registering SLF4JBridgeHandler with JUL's LogManager in a startup listener. None of these (logback-classic, sl4fj, jul-to-slf4j) are in the Tomcat classloader, they are being shipped in each webapp's WEB-INF/lib specifically so I can use different logback.xml settings for each webapp.

Since the LogManager isn't ClassLoaderLogManager anymore, and java.util.logging.LogManager is in the system classloader, each jul-to-slf4j initialization overrides the previous webapp's handler. As an end result, every jul log goes through the SLF4JBridgeHandler class that is in the classloader of the last webapp that performed the initialization and therefore uses the Logback instance and configuration of the last application.

Removing LOGGING_MANAGER=-Dnop makes Tomcat go back to using ClassLoaderLogManager as its jul manager and the jul-to-slf4j handlers don't override eachother. Each webapp then sees the SLF4JBridgeHandler from its own classloader and routes the log through its own instance of Logback properly.

Is there any reason why this setting is being recommended? It seems to me that keeping jul's logging manager set to org.apache.juli.ClassLoaderLogManager is highly beneficial to applications/libraries that use jul logging and it doesn't seem to impact anything else.

Stdout log format

Great library, many thanks for making tomcat logging much better.
This isn't an issue but a query. How do I change the log pattern of the logback messages. i.e. these appear in stdout but I'm not sure where to configure their pattern:
19:13:20,935 |-INFO in org.apache.juli.logging.ch.qos.logback.classic.LoggerContext[default] - Found resource [C:\opt\tomcat90\conf\logback.xml] at [file:/C:/opt/tomcat90/conf/logback.xml] 19:13:20,995 |-INFO in org.apache.juli.logging.ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [org.apache.juli.logging.ch.qos.logback.core.ConsoleAppender]

Handling of access log valve and its configuration file

It seems when using tomcat-juli-7.0.70-slf4j-1.7.21-logback-1.1.7.zip with Tomcat 7.0.70 the access log valve configuration is either not found or ignored when the specified path to logback-access.xml contains ${catalina.home}. This is somewhat supported by the documentation, but it only says that ${catalina.home} is no longer necessary, not that it prevents Tomcat from loading the specified logback-access.xml.

For reference, this is how we usually configure the access log valve for each of our Tomcat instances in server.xml (we use the separation between CATALINA_HOME and CATALINA_BASE to run multiple instances from one global CATALINA_HOME):

            <Valve className="ch.qos.logback.access.tomcat.LogbackValve" 
                   filename="${catalina.home}/conf/logback-access.xml"
                   quiet="true"
                   />

This works for Tomcat < 7.0.69 and tomcat-slf4j-logback for these versions, but not with Tomcat 7.0.70 as specified above. No access log is written at all when the filename for logback-access.xml is specified like this.

If I remove ${catalina.home} it works: the configuration file is found/loaded and access logs are written.

The problem is that we use multiple Tomcat and tomcat-slf4j-logback versions throughout our infrastructure, and manage them using Puppet. Previous versions of tomcat-slf4j-logback won't find logback-access.xml unless it is specified absolutely and/or with ${catalina.home}, but current versions don't find the file unless ${catalina.home} is not specified.

This makes it difficult or at least cumbersome to cater to the needs of different Tomcat/tomcat-slf4j-logback versions.

So I am asking: is it possible to fix up tomcat-slf4j-logback in such a way that the above access log valve definition works with newer versions as well? This way we can keep using filename="${catalina.home}/conf/logback-access.xml" throughout our infrastructure and don't have to differentiate between older and newer versions of Tomcat/tomcat-slf4j-logback in this regard.

Access logging is not working with default logback-access.xml and Tomcat 8.5.12

21:25:22,227 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - filename property not set. Assuming [conf/logback-access.xml]
21:25:22,228 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Found configuration file [/pub/site/app/conf/logback-access.xml] using property "catalina.base"
21:25:22,255 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute not set
21:25:22,261 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
21:25:22,264 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
21:25:22,288 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
21:25:22,289 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ACCESS-LOG]
21:25:22,303 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1427646530 - Archive files will be limited to [20 MB] each.
21:25:22,306 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1427646530 - Will use zip compression
21:25:22,308 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1427646530 - Will use the pattern /pub/site/app/logs/archive/localhost-access-%d{yyyyMMdd}-%i.log for the active file
21:25:22,310 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@3270d194 - The date pattern is 'yyyyMMdd' from file name pattern '/pub/site/app/logs/archive/localhost-access-%d{yyyyMMdd}-%i.log.zip'.
21:25:22,310 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@3270d194 - Roll-over at midnight.
21:25:22,314 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@3270d194 - Setting initial period to Thu Mar 16 21:25:22 NOVT 2017
21:25:22,314 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@3270d194 - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
21:25:22,316 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1427646530 - Cleaning on start up
21:25:22,316 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@25:25 - RuntimeException in Action for tag [rollingPolicy] java.lang.UnsupportedOperationException
        at java.lang.UnsupportedOperationException
        at      at ch.qos.logback.access.tomcat.LogbackValve.getScheduledExecutorService(LogbackValve.java:452)
        at      at ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover.cleanAsynchronously(TimeBasedArchiveRemover.java:226)
        at      at ch.qos.logback.core.rolling.TimeBasedRollingPolicy.start(TimeBasedRollingPolicy.java:112)
        at      at ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy.start(SizeAndTimeBasedRollingPolicy.java:30)
        at      at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:161)
        at      at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
        at      at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:158)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:145)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:103)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at      at ch.qos.logback.access.tomcat.LogbackValve.configureAsResource(LogbackValve.java:219)
        at      at ch.qos.logback.access.tomcat.LogbackValve.startInternal(LogbackValve.java:149)
        at      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at      at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:170)
        at      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
        at      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
        at      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at      at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
        at      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
21:25:22,316 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ACCESS-LOG] - No TriggeringPolicy was set for the RollingFileAppender named ACCESS-LOG
21:25:22,316 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[ACCESS-LOG] - For more information, please visit http://logback.qos.ch/codes.html#rfa_no_tp
21:25:22,316 |-WARN in ch.qos.logback.core.joran.action.AppenderAction - The object at the of the stack is not the appender named [ACCESS-LOG] pushed earlier.
21:25:22,316 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an AppenderAttachable at the top of execution stack. Near [appender-ref] line 28
21:25:22,316 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - End of configuration.
21:25:22,318 |-INFO in ch.qos.logback.access.joran.JoranConfigurator@4218d6a3 - Registering current configuration as safe fallback point
21:25:22,318 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Done configuring

Without cleanHistoryOnStart property logging works fine

tomcat 8.5.24 cannot be launched

The official tomcat-juli.jar has been modified, but this repository some classes are missing. See below:
Handler error
java.lang.ClassNotFoundException: org.apache.juli.AsyncFileHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:581)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:524)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:322)

Maven artifact

Hello. Thanks for the hard work. I'm not super familiar with Ivy+Maven interop, and I'm hoping it's not difficult-

I'd love to be able to upload this to my Maven server & rely on it alike any other Maven resource.

I am aware this needs to be put in tomcat's lib/ folder, not merely be captured by the Jar, but having it live in standard Maven repos would be much appreciated.

I'm slowly chunking through http://draconianoverlord.com/2010/07/18/publishing-to-maven-repos-with-ivy.html which- it's hard to tell- I think purports to help achieve this effect, but Ivy is all new to me and this is a fairly complicated configuration file.

How to make use of the SMTPAppender ?

Hi,
Could someone tell me know how I can use the STMPAppender in combination with tomcat-slf4j-logback ? (I'm getting "java.lang.ClassNotFoundException: javax.mail.internet.AddressException").
Ideally, I would also like to use the STMPAppender in my deployed web applications as well.
(the idea being to send an email notification for any caught or uncaught appilcation errors)
Thank you very much in advance for your feedback.
Regards
kbjp
PS: if I simply add the mail jar to the CLASSPATH through setenv.bat, it kind of "works" but seem to be conflicting with the mail jar from my applications.

syslog compatability

Does fact that logback-access does not directly support syslog affect this projects ability to make use of syslog too. (I see a SyslogAppender in tomcat-juli-logback-classic-1.0.11.jar supplied by this project)

Though I've added a syslog appender to logback.xml and the only logger left defined is "SYSLOG" I am not getting anything from tomcat in my syslog file. I believe I've followed the general instructions.

ubuntu 12.04, tomcat 7. tomcat-7.0.39-slf4j-1.7.5-logback-1.0.11.zip

Note: my application within tomcat is logging to syslog

Using Bitnami's Tomcat stack?

Has anyone had any success getting this to work using one of Bitnami's tomcat stack images?

I tried unzipping the contents as instructed and I can see that the logging has changed, however, it looks like it's ignoring the logback.xml file and dumping everything out at debug.

Thanks in advance for any insight on this!

Sean

Remove JASPER Listener for tomcat 8.0.x, 8.5.x, and 9.0.x

Jasper listener was removed. Apply that on newer versions. Since this will result in most configuration going locally similar to tomcat6, this makes for a good point to confirm no other gotcha's haven't otherwise been addressed.

FixedWindowRollingPolicy exceeds configured sizes

Hi, @hazendaz

When using FixedWindowRollingPolicy with straight forward configuration,
it sometimes writes over than the configured size files (20MB in my specific configuration [true for bigger sizes as well]), and sometimes I see that catalina.1.log (which isn't active file) is still being written to.

I've made sure no other process or webapp access this log. Also, tested the same logback version (1.1.7) with other plain java / webapp reporting massive amount of logs, and they all rolled over around 20.0 MB or 20.1 MB at most.

This once almost filled my disk.

Is easily produceble with 1MB and setting log level to DEBUG. Version: 8.5.6-with-logback-1.1.7

The configuration:

${MY_HOME}/logs/tomcat/catalina.log ${MY_HOME}/logs/tomcat/catalina.%i.log 1 10
<triggeringPolicy class="org.apache.juli.logging.ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
  <MaxFileSize>20MB</MaxFileSize>
</triggeringPolicy>

<encoder>
  <pattern>[%d{dd-MM HH:mm:ss.SSS}][-------TOMCAT------] %-5level - %msg {%logger{0}} [%thread] %n</pattern>
</encoder>

Maven Central

Can this project's resulting jars be put in maven central?

Default setenv.sh in $CATALINA_HOME ignored if there is setenv.sh in the $CATALINA_BASE

Hello!

I'm using single Tomcat installation for launching multiple Tomcat instances on the same server.
And I want to totally disable JULI so I extraced release archive in the $CATALINA_HOME and removed $CATALINA_HOME/conf/logging.properties.
I'm using setenv.sh to define CLASSPATH variable for some instances. And if there is local one $CATALINA_BASE/bin/setenv.sh, global one $CATALINA_HOME/bin/setenv.sh will not be included in the startup script:

if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
  . "$CATALINA_BASE/bin/setenv.sh"
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
  . "$CATALINA_HOME/bin/setenv.sh"
fi

My suggestion is to remove $CATALINA_HOME/bin/setenv.sh and add block in the $CATALINA_HOME/bin/catalina.sh startup script like this:

if [ -r "$CATALINA_BASE/conf/logback.xml" ]; then
  JAVA_OPTS="-Djuli-logback.configurationFile=$CATALINA_BASE/conf/logback.xml $JAVA_OPTS"
elif [ -r "$CATALINA_HOME/conf/logback.xml" ]; then
  JAVA_OPTS="-Djuli-logback.configurationFile=$CATALINA_HOME/conf/logback.xml $JAVA_OPTS"
fi

and place it before setenv.sh handling to keep ability to redefine juli-logback.configurationFile in the $CATALINA_BASE/bin/setenv.sh

This will let us to use custom logback.xml located in the $CATALINA_BASE/conf or use default in the $CATALINA_HOME/conf

Some webapps fail with "Class org.apache.juli.logging.impl.SLF4JLogFactory does not implement org.apache.commons.logging.LogFactory"

This is not directly related to this project but I figure this is a good place to possibly get some insight :)

We have some webapps that, when deployed in a Tomcat instance that uses Logback for logging (using this project's excellent efforts), fail with exceptions like this:

org.apache.commons.discovery.DiscoveryException:
  Class org.apache.juli.logging.impl.SLF4JLogFactory does not implement \
  org.apache.commons.logging.LogFactory

We have to set this Java property for these webapps to work again:

-Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl

These webapps usually use Log4j (e.g. log4j-1.2.17.jar) and SLF4j (e.g. slf4j-api-1.7.5.jar and sometimes slf4j-log4j12-1.7.5.jar) internally for logging, but are not really similar in any special way. Some include commons-logging-1.1.jar or commons-logging-1.0.4.jar and others include nothing related to commons-logging.

Do you have an idea what these webapps are doing wrong (if anything) or what they are missing in order to work correctly with a Tomcat instance that uses Logback internally? Or is setting the above property really the solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.