logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Log4j2 example required for java enterprise application
Date Thu, 09 Aug 2018 15:50:08 GMT
>From what I remember, you can add log4j-api and log4j-core (and any other
logging bridges) to your EE server's shared lib folder (or install as a
module in JBoss for example), though if it's all in one ear, you could just
make it a normal library in there.

As for a shared configuration, you can point them all to the same
log4j2.xml config file, though you can also do the opposite and use a
config per application (see <
http://logging.apache.org/log4j/2.x/manual/webapp.html#ContextParams> for
some more info). The docs about web applications apply equally well to an
EAR containing a WAR (or more). As for EJBs specifically, I think there's
an open issue about it already. If not, feel free to submit an issue (and
PR if possible).

On Thu, 9 Aug 2018 at 04:19, Rajvinder Pal <rajvinder.pal@gmail.com> wrote:

> Hi,
>
> I am looking for an example to configure log4j2 in a java enterprise
> application consisting of Ejbs, WAR and Utility jars. I want to understand
> where to place the logging jars, configuration file in a Java EE
> application. Can i use a common log4j2.xml for the complete application?
>
> Thanks,
> Raj
>


-- 
Matt Sicker <boards@gmail.com>

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