I don't think it's possible to do this in configuration. In the sharedLib code,
you can obtain Loggers by calling LogManager.getContext(true).getLogger().
I think that will force the specified Logger to live in a separate context from
your application. I wouldn't like hard-coding this in my
There may be other ways to do this, but if the classes in the sharedLib are
in a specific package, you could configure the log4j2.xml configurations
for both web apps to create a separate appender (and a separate log file)
for the loggers for that package.
Remko
On Sat, Jul 23, 2016 at 3:18 AM,
Hi Remko,
thanks for the suggestion, that's actually what I am doing currently.
That is, listing the various class packages in the shared libs to be
logged to a common log file.
But was trying to see if there's some more robust way to do that,
something like (maybe) specify/config which