Show log4j logs in Eclipse RCP consoleView [message #1780959] |
Tue, 30 January 2018 07:56  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.24435 seconds