logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: How can I use log4j 2 if there are both log4j and log4j 2 jars included in classpath?
Date Fri, 19 May 2017 16:10:44 GMT
You can also put all the Log4j 2 jars FIRST on the classpath.

Gary

On May 19, 2017 8:42 AM, "Ralph Goers" <ralph.goers@dslextreme.com> wrote:

> To be frank, uber jars like this that include other people’s stuff are a
> terrible idea for exactly this reason. See http://activemq.apache.org/
> initial-configuration.html <http://activemq.apache.org/
> initial-configuration.html>. It itemizes all the jars that are rolled
> into the uber jar.  You need to just use the individual dependencies you
> need.
>
> Ralph
>
> > On May 19, 2017, at 2:12 AM, Sigmond Hola <sigmund.god@gmail.com> wrote:
> >
> > We have a web project want to use log4j 2 for logging.
> >
> > But after I add
> >
> >   - log4j-api-2.x.jar
> >   - log4j-core-2.x.jar
> >
> > to WEB-INF/lib, and add log4j2.xml to WEB-INF/classes, log4j 2 not work.
> >
> > I finally found out that there is a jar named activemq-all.jar under
> > WEB-INF/lib, and it have classes of log4j (v1) and slf4j inside it.
> >
> > Since I cannot delete activemq-all.jar, so how can I use log4j 2 for
> > logging while both log4j and log4j 2 classes are in the classpath?
> >
> > Thanks.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message