I have a test that shows my groups usage. Should I just attach it as a part 
of a post to this forum? It definitely behaves differently with the 1.10.5 
vs. with my patch, with regards to how many logger instances get stored in 
m_loggers (especially if I use Log4J1 vs. Log4J2 as my API).

I use the Log4J2 API in my real code, as I've stated before (but 
third-party code we use uses SLF4J or JCL, and maybe others). I tried to 
use the ThreadContext in my code (instead of the Markers that Ralph 
mentioned), and ran into trouble, because I ran into the problem described 
in https://ops4j1.jira.com/browse/PAXLOGGING-244 , for which the fix was 
not applied to the 1.10.5 branch. Once I backported that fix to the 1.10.5 
branch (making a new pax-logging-api and new pax-logging-log4j2, the 
ThreadContext worked, and I could re-use logger names and still see which 
"group" my log statements were from.

Even if I change my code to use ThreadContext, the memory behavior of 
1.10.5 with regards to m_loggers is still a leak compared to the old 1.6.1 
we were using, as I have been stating all along.

I think the inconsistencies with regard to the following two items 
(mentioned in my previous post) is also an issue:
1. storing values in the m_loggers maps when m_paxLogging is non-null (
*only* SLF4J API in pax-logging-api 1.10.5 does **not** store it if 
m_paxLogging is non-null), and
2. getting a new logger even if a name is reused vs. re-using the old 
logger (*only* Log4J2 API in pax-logging-api 1.10.5 reuses the logger if 
the name was already used--other implementations just keep creating new 
loggers for the same name, and store all of those loggers in m_loggers)

Because of #1 and #2, if I was using Log4J1 API in pax-logging-api 1.10.5, 
then even if I re-used the name for a non-static logger, the m_loggers just 
keeps growing. At least with Log4J2, if I re-use the name for a non-static 
logger, the m_loggers does not grow.

Thanks again,
Monica

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/e6783b83-bc0c-4d98-aae3-d28e72949c2b%40googlegroups.com.

Reply via email to