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 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: 877
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.
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: Mon Jan 30 16:08:19 GMT 2023

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

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

Back to the top