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: reusing a logger+appender
Date Thu, 08 Feb 2018 00:37:16 GMT
You could potentially use JNDI to load and store your configuration if
using Java EE. Otherwise, you could also set the config file name system
property to locate a common config file (at least through the local file
system or class path).

On Wed, Feb 7, 2018 at 18:01, Benjamin Jaton <benjamin.jaton@gmail.com>

> Hello,
> I would like to have a piece of code use Log4J2 to log events in a CSV
> format. So the appender and logger configuration are specific to this task.
> The problem is that there are several JVMs that might invoke this task (not
> at the same time though). Therefore I would think that each of those JVMs
> need to have the same definition of logger+appender in their log4j2 conf.
> Is there a way to load a log4j2 file on demand that would make the
> appenders/loggers in it available? (without breaking the existing ones)
> Or maybe you will think of a better way to do this?
> Note: I am using JSON to configure log4j2.
> Thanks,
> Benjamin
Matt Sicker <boards@gmail.com>

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