Skip to main content



      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 07:56 Go to next message
Eclipse UserFriend


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 12:39 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 23:57:01 EDT 2025

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

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

Back to the top