2014-12-08 23:51 GMT+03:00  <[email protected]>:
> Author: rjung
> Date: Mon Dec  8 20:51:01 2014
> New Revision: 1643912
>
> URL: http://svn.apache.org/r1643912
> Log:
> Add support for Log4J2 to juli.
>
> Log4J2 has builtin support for commons logging.
> But using that would mean the Log4J2 jar files have
> to be put on the CLASSPATH. One can instead integrate
> Log4J2 similar to Log4J and the code is very similar
> to what is in org.apache.logging.log4j.jcl.
>
> Needs documentation.

1. Log4J2 can also be plugged into JUL. (I think that would be the
easiest approach, using already existing library).

http://logging.apache.org/log4j/2.x/log4j-jul/index.html

2. I thought that the way to leverage commons logging for Log4j is to
take their jcl bridge (3 classes)
http://logging.apache.org/log4j/2.x/log4j-jcl/index.html

and

1) apply package renaming to those 3 classes
2) compile those 3 classes against our package-renamed
extra/tomcat-juli[-adapters].jar  and package into separate JAR with a
separate ant target.

It shall be close to what you are doing, but it looks that you are
patching commons-logging build file.

3. Generally, I do not like <patch> as a long-term solution, as that
tool is not available under Windows, unless you specifically configure
it (needs update to BUILDING.txt)/

4. When I downloaded commons-logging 1.2 from commons site, I noted
that there is a difference in packaging.

Version 1.1.3 had two jars (.jar and adapters.jar),  where 1.2 only
one jar (with all classes from the adapters file).  I have not
investigated whether that was an intended change.

You changed version to 1.2. Does the build still produce the
-adapters.jar file.  If it does not then installation instruction
(logging-howto) and build file that uploads jars to Maven need to be
updated.

Best regards,
Konstantin Kolinko

> Probably a candidate for upstream (commons logging).

Interesting.

> Added:
>     tomcat/trunk/res/patches/
>     tomcat/trunk/res/patches/commons-logging-log4j2.patch   (with props)
> Modified:
>     tomcat/trunk/build.properties.default
>     tomcat/trunk/build.xml
>
> Modified: tomcat/trunk/build.properties.default
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1643912&r1=1643911&r2=1643912&view=diff
> ==============================================================================
> --- tomcat/trunk/build.properties.default (original)
> +++ tomcat/trunk/build.properties.default Mon Dec  8 20:51:01 2014
> @@ -92,7 +92,7 @@ base-maven.loc=http://repo.maven.apache.
>  # - log4j
>  # - logkit
>  # - servletapi
> -commons-logging.version=1.1.3
> +commons-logging.version=1.2
> ...

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to