Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Carter Kozak
I couldn't understand why one of the two tests I added in this PR failed, and 
root caused it to the linked change:
https://github.com/apache/logging-log4j2/pull/713

On Mon, Jan 17, 2022, at 16:28, Volkan Yazıcı wrote:
> Carter, how did you manage to promptly spot the glitch? I suppose you don't
> have a custom CI pipeline of yours.
> 
> On Mon, Jan 17, 2022 at 7:51 PM Carter Kozak  wrote:
> 
> > Please revert, this breaks stacklocatorutil on java 9+ with the following:
> >
> > Caused by: java.lang.NoSuchMethodError: 'java.util.Deque
> > org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
> > at
> > org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
> > at
> > org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
> > at
> > org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
> > at
> > org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
> > at
> > org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
> > at
> > org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
> > at
> > org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
> > at
> > org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
> > at
> > org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
> > ... 50 more
> >
> > -ck
> >
> > On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
> > > This is an automated email from the ASF dual-hosted git repository.
> > >
> > > ggregory pushed a change to branch release-2.x
> > > in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
> > >
> > >
> > > from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the
> > 1.2 bridge.
> > >  new 97f3153  Replace internal use of synchronized java.util.Stack
> > with unsynchronized java.util.Deque. These objects are not shared between
> > threads.
> > >  new 97f9201  Replace internal use of synchronized java.util.Stack
> > with unsynchronized java.util.Deque. These objects are not shared between
> > threads.
> > >
> > > The 2 revisions listed above as "new" are entirely new to this
> > > repository and will be described in separate emails.  The revisions
> > > listed as "add" were already present in the repository and have only
> > > been added to this reference.
> > >
> > >
> > > Summary of changes:
> > > log4j-api/revapi.json|  1 +
> > > .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8
> > 
> > > .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
> > > .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
> > > .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12
> > 
> > > .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
> > > .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12
> > ++--
> > > .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
> > > 8 files changed, 32 insertions(+), 25 deletions(-)
> > >
> >
> 

-ck


Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Volkan Yazıcı
Carter, how did you manage to promptly spot the glitch? I suppose you don't
have a custom CI pipeline of yours.

On Mon, Jan 17, 2022 at 7:51 PM Carter Kozak  wrote:

> Please revert, this breaks stacklocatorutil on java 9+ with the following:
>
> Caused by: java.lang.NoSuchMethodError: 'java.util.Deque
> org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
> at
> org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
> at
> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
> at
> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
> at
> org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
> at
> org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
> at
> org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
> at
> org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
> at
> org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
> at
> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
> ... 50 more
>
> -ck
>
> On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > ggregory pushed a change to branch release-2.x
> > in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
> >
> >
> > from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the
> 1.2 bridge.
> >  new 97f3153  Replace internal use of synchronized java.util.Stack
> with unsynchronized java.util.Deque. These objects are not shared between
> threads.
> >  new 97f9201  Replace internal use of synchronized java.util.Stack
> with unsynchronized java.util.Deque. These objects are not shared between
> threads.
> >
> > The 2 revisions listed above as "new" are entirely new to this
> > repository and will be described in separate emails.  The revisions
> > listed as "add" were already present in the repository and have only
> > been added to this reference.
> >
> >
> > Summary of changes:
> > log4j-api/revapi.json|  1 +
> > .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8
> 
> > .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
> > .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
> > .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12
> 
> > .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
> > .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12
> ++--
> > .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
> > 8 files changed, 32 insertions(+), 25 deletions(-)
> >
>


Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Carter Kozak
Adding a test in a java9+ module which passes an exception does not work after 
the linked commit (e.g. https://github.com/apache/logging-log4j2/pull/713), it 
seems we are missing test coverage. Testability is a strong reason to avoid 
multi-release jars, but the alternatives leave a lot to be desired as well.

-ck

On Mon, Jan 17, 2022, at 14:48, Gary Gregory wrote:
> How does this stack trace happen when my full local builds and github builds 
> are green? Are we missing a test for this feature?
> 
> Gary
> 
> 
> On Mon, Jan 17, 2022, 13:51 Carter Kozak  wrote:
>> __
>> Please revert, this breaks stacklocatorutil on java 9+ with the following:
>> 
>> Caused by: java.lang.NoSuchMethodError: 'java.util.Deque 
>> org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
>> at 
>> org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
>> at 
>> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
>> at 
>> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
>> at 
>> org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
>> at 
>> org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
>> at 
>> org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
>> at 
>> org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
>> at 
>> org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
>> at 
>> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
>> ... 50 more
>> 
>> -ck
>> 
>> On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
>>> This is an automated email from the ASF dual-hosted git repository.
>>> 
>>> ggregory pushed a change to branch release-2.x
>>> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
>>> 
>>> 
>>> from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the 
>>> 1.2 bridge.
>>>  new 97f3153  Replace internal use of synchronized java.util.Stack with 
>>> unsynchronized java.util.Deque. These objects are not shared between 
>>> threads.
>>>  new 97f9201  Replace internal use of synchronized java.util.Stack with 
>>> unsynchronized java.util.Deque. These objects are not shared between 
>>> threads.
>>> 
>>> The 2 revisions listed above as "new" are entirely new to this
>>> repository and will be described in separate emails.  The revisions
>>> listed as "add" were already present in the repository and have only
>>> been added to this reference.
>>> 
>>> 
>>> Summary of changes:
>>> log4j-api/revapi.json|  1 +
>>> .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8 
>>> .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
>>> .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
>>> .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12 
>>> 
>>> .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
>>> .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12 
>>> ++--
>>> .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
>>> 8 files changed, 32 insertions(+), 25 deletions(-)
>>> 
>> 


Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Ralph Goers
This could be fixed. It would require adding a log4j-api-java9-tests module 
that sets toolchains 
to Java 9 and runs whatever tests are in the module. Same for Log4j-core. You 
don’t need to 
run the full suite of tests. Just the stuff that is in the META-INF/versions 
directory.

Ralph

> On Jan 17, 2022, at 12:49 PM, Ralph Goers  wrote:
> 
> Yes. The unit tests for core only exercise Java 8 as the build happens with 
> Java 8.
> 
> Ralph
> 
> 
> 
>> On Jan 17, 2022, at 12:48 PM, Gary Gregory  wrote:
>> 
>> How does this stack trace happen when my full local builds and github
>> builds are green? Are we missing a test for this feature?
>> 
>> Gary
>> 
>> 
>> On Mon, Jan 17, 2022, 13:51 Carter Kozak  wrote:
>> 
>>> Please revert, this breaks stacklocatorutil on java 9+ with the following:
>>> 
>>> Caused by: java.lang.NoSuchMethodError: 'java.util.Deque
>>> org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
>>> at
>>> org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
>>> at
>>> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
>>> at
>>> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
>>> at
>>> org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
>>> at
>>> org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
>>> at
>>> org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
>>> at
>>> org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
>>> at
>>> org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
>>> at
>>> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
>>> ... 50 more
>>> 
>>> -ck
>>> 
>>> On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
>>> 
>>> This is an automated email from the ASF dual-hosted git repository.
>>> 
>>> ggregory pushed a change to branch release-2.x
>>> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
>>> 
>>> 
>>>   from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the
>>> 1.2 bridge.
>>>new 97f3153  Replace internal use of synchronized java.util.Stack
>>> with unsynchronized java.util.Deque. These objects are not shared between
>>> threads.
>>>new 97f9201  Replace internal use of synchronized java.util.Stack
>>> with unsynchronized java.util.Deque. These objects are not shared between
>>> threads.
>>> 
>>> The 2 revisions listed above as "new" are entirely new to this
>>> repository and will be described in separate emails.  The revisions
>>> listed as "add" were already present in the repository and have only
>>> been added to this reference.
>>> 
>>> 
>>> Summary of changes:
>>> log4j-api/revapi.json|  1 +
>>> .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8 
>>> .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
>>> .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
>>> .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12
>>> 
>>> .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
>>> .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12
>>> ++--
>>> .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
>>> 8 files changed, 32 insertions(+), 25 deletions(-)
>>> 
>>> 
>>> 
> 



Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Ralph Goers
Yes. The unit tests for core only exercise Java 8 as the build happens with 
Java 8.

Ralph



> On Jan 17, 2022, at 12:48 PM, Gary Gregory  wrote:
> 
> How does this stack trace happen when my full local builds and github
> builds are green? Are we missing a test for this feature?
> 
> Gary
> 
> 
> On Mon, Jan 17, 2022, 13:51 Carter Kozak  wrote:
> 
>> Please revert, this breaks stacklocatorutil on java 9+ with the following:
>> 
>> Caused by: java.lang.NoSuchMethodError: 'java.util.Deque
>> org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
>> at
>> org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
>> at
>> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
>> at
>> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
>> at
>> org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
>> at
>> org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
>> at
>> org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
>> at
>> org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
>> at
>> org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
>> at
>> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
>> ... 50 more
>> 
>> -ck
>> 
>> On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
>> 
>> This is an automated email from the ASF dual-hosted git repository.
>> 
>> ggregory pushed a change to branch release-2.x
>> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
>> 
>> 
>>from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the
>> 1.2 bridge.
>> new 97f3153  Replace internal use of synchronized java.util.Stack
>> with unsynchronized java.util.Deque. These objects are not shared between
>> threads.
>> new 97f9201  Replace internal use of synchronized java.util.Stack
>> with unsynchronized java.util.Deque. These objects are not shared between
>> threads.
>> 
>> The 2 revisions listed above as "new" are entirely new to this
>> repository and will be described in separate emails.  The revisions
>> listed as "add" were already present in the repository and have only
>> been added to this reference.
>> 
>> 
>> Summary of changes:
>> log4j-api/revapi.json|  1 +
>> .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8 
>> .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
>> .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
>> .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12
>> 
>> .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
>> .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12
>> ++--
>> .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
>> 8 files changed, 32 insertions(+), 25 deletions(-)
>> 
>> 
>> 



Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Gary Gregory
How does this stack trace happen when my full local builds and github
builds are green? Are we missing a test for this feature?

Gary


On Mon, Jan 17, 2022, 13:51 Carter Kozak  wrote:

> Please revert, this breaks stacklocatorutil on java 9+ with the following:
>
> Caused by: java.lang.NoSuchMethodError: 'java.util.Deque
> org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
> at
> org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
> at
> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
> at
> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
> at
> org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
> at
> org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
> at
> org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
> at
> org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
> at
> org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
> at
> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
> ... 50 more
>
> -ck
>
> On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> ggregory pushed a change to branch release-2.x
> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
>
>
> from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the
> 1.2 bridge.
>  new 97f3153  Replace internal use of synchronized java.util.Stack
> with unsynchronized java.util.Deque. These objects are not shared between
> threads.
>  new 97f9201  Replace internal use of synchronized java.util.Stack
> with unsynchronized java.util.Deque. These objects are not shared between
> threads.
>
> The 2 revisions listed above as "new" are entirely new to this
> repository and will be described in separate emails.  The revisions
> listed as "add" were already present in the repository and have only
> been added to this reference.
>
>
> Summary of changes:
> log4j-api/revapi.json|  1 +
> .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8 
> .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
> .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
> .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12
> 
> .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
> .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12
> ++--
> .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
> 8 files changed, 32 insertions(+), 25 deletions(-)
>
>
>


Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Carter Kozak
This may fix the regression: https://github.com/apache/logging-log4j2/pull/714

-ck

On Mon, Jan 17, 2022, at 13:50, Carter Kozak wrote:
> Please revert, this breaks stacklocatorutil on java 9+ with the following:
> 
> Caused by: java.lang.NoSuchMethodError: 'java.util.Deque 
> org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
> at 
> org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
> at 
> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
> at 
> org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
> at 
> org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
> at 
> org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
> at 
> org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
> at 
> org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
> at 
> org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
> at 
> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
> ... 50 more
> 
> -ck
> 
> On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> > 
> > ggregory pushed a change to branch release-2.x
> > in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
> > 
> > 
> > from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the 
> > 1.2 bridge.
> >  new 97f3153  Replace internal use of synchronized java.util.Stack with 
> > unsynchronized java.util.Deque. These objects are not shared between 
> > threads.
> >  new 97f9201  Replace internal use of synchronized java.util.Stack with 
> > unsynchronized java.util.Deque. These objects are not shared between 
> > threads.
> > 
> > The 2 revisions listed above as "new" are entirely new to this
> > repository and will be described in separate emails.  The revisions
> > listed as "add" were already present in the repository and have only
> > been added to this reference.
> > 
> > 
> > Summary of changes:
> > log4j-api/revapi.json|  1 +
> > .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8 
> > .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
> > .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
> > .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12 
> > 
> > .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
> > .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12 
> > ++--
> > .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
> > 8 files changed, 32 insertions(+), 25 deletions(-)
> > 
> 


Re: [Chainsaw] Removal of Log4j1

2022-01-17 Thread Robert Middleton
Thanks for the input.  In that case I will certainly make sure that we
do keep the VFSLogFilePatternReceiver.

One thing that would be helpful if you have time Scott would be a
manual on how to use Chainsaw and the features that it has.  I
understand it enough now, but for people first trying to use it there
isn't really any good documentation.

-Robert Middleton

On Mon, Jan 17, 2022 at 1:17 AM Scott Deboy  wrote:
>
> Looks great!
>
> It's a lot of work for sure - lots more to do to fully remove log4j1 -
> custom level support (java.util.logging and Android for example),
> support for UI-based interactions for some receivers(activateOptions),
> and the loggerRepository extension pieces.
>
> I definitely want to see VFSLogFilePatternReceiver preserved of course
> - it's turned out to be a very useful Receiver (parse mostly-arbitrary
> log formats, even remote/ssh).
>
> Happy to help I just never have much time.
>
> Scott
>
>
>
> On 1/16/22, Robert Middleton  wrote:
> > I've been working on this for a little bit now, and I do have
> > something that mostly seems to work.  This has been made somewhat more
> > difficult by the very tight coupling that Chainsaw has with log4j1 and
> > its plugin framework.  At this point, I've done the following:
> >
> > * Remove dependency on log4j1-extras
> > * Add in log4j2 dependencies for logging
> > * Create a generic Chainsaw log event that is used to pass log events
> > around internally
> > * Rework the receivers framework to use ServiceLoader instead of some
> > home-grown system
> >
> > If people are willing to take a look at what I've done so far, the
> > (very rough still) branch is here:
> > https://github.com/rm5248/logging-chainsaw/tree/remove-log4j1
> >
> > There are still a number of bugs in it still, since there's  a fair
> > amount of invasive surgery.  If you want to test, you'll need to do
> > the following:
> > 1. Remove your ~/.chainsaw directory(this may or may not be needed; it
> > doesn't seem to like to load old settings at the moment)
> > 2. Start chainsaw
> > 3. Open the 'receivers' panel(icon that looks like a satellite dish)
> > 4. Create  a new JSON receiver.  There's only one option, so you can click
> > 'ok'
> > 5. Run log4j2 with a configuration file similar to the following:
> >
> > ?xml version="1.0" encoding="UTF-8"?>
> > 
> >   
> > 
> >   
> > 
> > 
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> >   
> > 
> >
> > You should then see log messages showing up in a new tab.
> >
> > -Robert Middleton
> >
> > On Tue, Dec 28, 2021 at 6:32 AM Volkan Yazıcı  wrote:
> >>
> >> +1 for implementation-agnostic custom DTO tailored for Chainsaw.
> >>
> >> On Mon, Dec 27, 2021 at 9:31 PM Matt Sicker  wrote:
> >>
> >> > I agree on the generic approach. While there’s a LogEvent interface in
> >> > log4j2, it would probably make sense for Chainsaw to define its own
> >> > DTOs
> >> > and such.
> >> > --
> >> > Matt Sicker
> >> >
> >> > > On Dec 26, 2021, at 15:50, Ralph Goers 
> >> > wrote:
> >> > >
> >> > > Scott has been sort of maintaining Chainsaw on his own for years. I
> >> > > am
> >> > sure he would love new energy in the project.
> >> > >
> >> > > I think isolating it from any logging framework implementation would
> >> > > be
> >> > a good thing.
> >> > >
> >> > > Ralph
> >> > >
> >> > >> On Dec 26, 2021, at 2:13 PM, Robert Middleton
> >> > >> 
> >> > wrote:
> >> > >>
> >> > >> I've been looking into Chainsaw to remove Log4j1, since that is
> >> > >> rather
> >> > >> obsolete at this point.  Unfortunately, Chainsaw is closely tied to
> >> > >> Log4j1, as it seems that what happens is when it receives events
> >> > >> from
> >> > >> a source, it sends the messages to a custom LoggerRepository with a
> >> > >> custom appender that will then show the log messages.
> >> > >>
> >> > >> There are also a handful of classes from the log4j1 extras package
> >> > >> that are used as well, such as Rule.
> >> > >>
> >> > >> It seems to me that the proper way to do this then is to:
> >> > >> * Copy any of the log4j1 extras classes we need into Chainsaw
> >> > >> * Define an internal representation of log messages so that we don't
> >> > >> depend on the log4j1 LoggingEvent class(perhaps a modified version
> >> > >> of
> >> > >> the log4j1 LoggingEvent)
> >> > >> * Refactor the code so that when a log event comes in, we simply
> >> > >> push
> >> > >> it to whatever tab we want to see it on, instead of indirectly via
> >> > >> log4j1.
> >> > >> * Create a custom Appender for log4j2 so that we can still see
> >> > >> internal Chainsaw messages within Chainsaw, and convert internal log
> >> > >> messages to log4j2.
> >> > >>
> >> > >> Thoughts?
> >> > >>
> >> > >> -Robert Middleton
> >> > >>
> >> > >
> >> >
> >> >
> >


Re: [logging-log4j2] branch release-2.x updated (ff33bbc -> 97f9201)

2022-01-17 Thread Carter Kozak
Please revert, this breaks stacklocatorutil on java 9+ with the following:

Caused by: java.lang.NoSuchMethodError: 'java.util.Deque 
org.apache.logging.log4j.util.StackLocator.getCurrentStackTrace()'
at 
org.apache.logging.log4j.util.StackLocatorUtil.getCurrentStackTrace(StackLocatorUtil.java:116)
at 
org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:111)
at 
org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:96)
at 
org.apache.logging.log4j.core.impl.MutableLogEvent.getThrownProxy(MutableLogEvent.java:347)
at 
org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy.(Log4jLogEvent.java:970)
at 
org.apache.logging.log4j.core.impl.Log4jLogEvent.serialize(Log4jLogEvent.java:745)
at 
org.apache.logging.log4j.core.impl.MutableLogEvent.createMemento(MutableLogEvent.java:472)
at 
org.apache.logging.log4j.test.appender.ListAppender.append(ListAppender.java:122)
at 
org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:161)
... 50 more

-ck

On Sat, Jan 8, 2022, at 11:08, ggreg...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> ggregory pushed a change to branch release-2.x
> in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.
> 
> 
> from ff33bbc  Add StackLocatorUtil.getCallerClassLoader(int) for the 1.2 
> bridge.
>  new 97f3153  Replace internal use of synchronized java.util.Stack with 
> unsynchronized java.util.Deque. These objects are not shared between threads.
>  new 97f9201  Replace internal use of synchronized java.util.Stack with 
> unsynchronized java.util.Deque. These objects are not shared between threads.
> 
> The 2 revisions listed above as "new" are entirely new to this
> repository and will be described in separate emails.  The revisions
> listed as "add" were already present in the repository and have only
> been added to this reference.
> 
> 
> Summary of changes:
> log4j-api/revapi.json|  1 +
> .../log4j/util/PrivateSecurityManagerStackTraceUtil.java |  8 
> .../java/org/apache/logging/log4j/util/StackLocator.java |  7 ---
> .../java/org/apache/logging/log4j/util/StackLocatorUtil.java |  4 ++--
> .../org/apache/logging/log4j/util/StackLocatorUtilTest.java  | 12 
> .../org/apache/logging/log4j/core/impl/ThrowableProxy.java   |  6 +++---
> .../apache/logging/log4j/core/impl/ThrowableProxyHelper.java | 12 ++--
> .../apache/logging/log4j/core/impl/ThrowableProxyTest.java   |  7 ---
> 8 files changed, 32 insertions(+), 25 deletions(-)
>