-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No appender with 1.2.24, 1.2.23 works fine #62
Comments
Perhaps this commit: 3f35d07? I'll try reverting that commit and test with it. |
Yes that was it, that commit changed class loading behaviour. When I checked out tag v1.2.24, reverted commit 3f35d07, rebuilt the jar and deployed, it all worked fine. Can you resolve this with a release soon please? |
I've had a bit more of a look. We have reload4j.jar in glassfish/lib and log4j.properties in the webapp WAR (a reasonable strategy given each WAR might want to customize its logging configuration). reload4j 1.2.24 no longer uses the Thread Context Class Loader for finding the |
I believe reload4j should continue using the Thread Context Class Loader if present. Can this be sorted out please? |
We are hitting the same issue. Any updates and when can we expect this to be fixed? Thanks a lot. |
@ceki can we get an update on this please? |
Commit 3f35d07 fixes a pre-existing bug. The fact that it enabled an undesired behavior needs to be analyzed and corrected appropriately. However, I am quite swamped at the moment. If you need an issue fixed as soon as possible, then consider championing a release. |
Unfortunately I can't make the dollars happen for you but that commit was a major breaking change for users of Java 8 in my books. I'd like to see that commit fixed or rolled back in a release and fixed properly later. The Thread Context Class Loader use is just as valid for Java 9+ (and if disabled there we'd be buggered promoting our stuff to Java 9+). The |
When run in JDK 9 and later, the code in reload4j 1.2.23 never used the TCCL. Version 1.2.24 preserves the same behavior. However, in JDK 8 and earlier, the code in reload4j 1.2.23 used the TCCL by default. While in your environment it may be appropriate to use TCCL in JDK 9+ as well, other users might want to preserve existing behavior. I don't think there is a perfect solution fixing this issue. The best I can think of would be to default to TCCL, unless the "log4j.ignoreTCL" flag was set to true. If getting the resource using TCCL was unsuccessful then try with the class loader that loaded "Loader.class". BTW, this is the behavior you seem to ask for. |
Thanks @ceki, I think defaulting to TCCL and using a system property to skip it is great. Thanks for reviewing. |
Thanks @ceki! I've reviewed the commit 7d73278. I can see some comment and javadoc typos, would be easier to provide review comments if you made a PR, even if you merge it before others get to it. Works well for changes where you might get some discussion. Anyway, thanks again for making the time for this. |
@davidmoten Thank you for the suggestion. I've looked at commit 7d73278 but could not see any typos. You are most welcome to make comments on said commit directly. |
Righto, added comment about one trivial typo in the commit. I suspect this javadoc needs updating: reload4j/src/main/java/org/apache/log4j/helpers/Loader.java Lines 150 to 153 in 47b6d71
Also noticed other typos in Loader.java, trivial also (don't care if never get fixed):
|
We use reload4j in the lib directory of a glassfish 4 installation (old!) with Java 8, webapps have reload4j at provided scope. 1.2.23 works fine for us but no appender was found when we used reload4j 1.2.24. Being the logger, no information turns up in the logs even after setting system logging to FINE level. I checked the MANIFEST.MF files between the two versions and they look fine, checking further of course I am hamstrung by an enormous amount of source code change associated with reformatting. Any suggestions as to what has been affected?
The text was updated successfully, but these errors were encountered: