Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Show log4j logs in Eclipse RCP consoleView(Print logs on Eclipse console/custom appender with consoleView)
Show log4j logs in Eclipse RCP consoleView [message #1780959] Tue, 30 January 2018 12:56 Go to next message
Albert Houston is currently offline Albert HoustonFriend
Messages: 8
Registered: December 2017
Junior Member


I added log4j to my Eclipse RCP application. Appending logs to file works fine. Appending to console works, but only if I run my application from command line or when I debug it (then, logs are shown in consoleView in "host", develop Eclipse)

I want logs to be shown in consoleView in RCP. I set that view in my perspectiveExtention, and tried to pass -Dforce-ide-log-level=debug argument, but it doesn't work. Should I give special arguments in my log4j.properties file?
Re: Show log4j logs in Eclipse RCP consoleView [message #1781481 is a reply to message #1780959] Wed, 07 February 2018 17:39 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 788
Registered: January 2012
Senior Member

Sorry, this is a bit late. You have two problems here. First, Eclipse uses its own logging implementation that basically logs messages in a specific format to .../.metadata/.log. Second, the Error Log view processes the .../.metadata/.log file to extract those specifically-formatted log messages. You can address the first problem by configuring the Eclipse logger to log with log4j by writing some glue code (see the OSGi LogService). You cannot change the Error Log viewer to parse a log4j log file, unless you write an log4j appender that will output in the Eclipse log format to .../.metadata/.log.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Failed to open both Excel document and SWT application with Win32OLE embedded objects same time.
Next Topic:Regarding clickable labels in eclipse plugin
Goto Forum:
  


Current Time: Tue Nov 20 16:13:24 GMT 2018

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

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

Back to the top