Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How do I suppress log4j logging from org.eclipse plugins?(How do I control org.eclipse logging with no access to their
How do I suppress log4j logging from org.eclipse plugins? [message #1841859] Tue, 01 June 2021 11:29 Go to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 33
Registered: March 2013
I am developing plugins that import org.apache.log4j and org.slf4j. Logging is done to the console. I get huge numbers of log messages from that make it very difficult to see what my own plugins are doing. I tried putting in the files in my plugins. Occasionally that seems to work, but mostly not. How do I suppress logging from Eclipse plugins that are not mine?
Re: How do I suppress log4j logging from org.eclipse plugins? [message #1841866 is a reply to message #1841859] Tue, 01 June 2021 14:30 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 464
Registered: August 2016
Senior Member
For my own debugging, I write an external log4j or logback configuration (depending on what logging back-end there is in the Eclipse instance) and then start Eclipse with -Dlogback.configurationFile or -Dlog4j.configuration, which you can set either in eclipse.ini or via environment variable _JAVA_OPTIONS before starting Eclipse.

I don't remember the details of log4j configuration in plug-ins in Eclipse; last time I looked, I think the only reliable way was to write a fragment for org.apache.log4j to override a built-in I think Xtext uses that mechanism. Which of course immediately raises the question of what happens if multiple such fragments exist. I think it's then indeterminate which config will be taken.
Previous Topic:XMLHttpRequest
Next Topic:Build errors
Goto Forum:

Current Time: Sat May 21 10:28:34 GMT 2022

Powered by FUDForum. Page generated in 0.03114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top