Programmatic access to development workbench for logging? [message #266284] |
Tue, 10 August 2004 11:40 |
Eclipse User |
|
|
|
I have a plugin that is being used for both JUnit plug-in tests and
JUnit standalone tests. In the latter case no runtime workbench is
loaded, so Platform.isRunning() returns false.
What I would like to do is to be able to use the platform's logging
capabilities (org.eclipse.core.runtime.ILog.log) to log error messages
in a way that will work in both cases. If the platform is not running
then it's not possible to specify traces; in this case all logging
output would be delivered to the logfile and console.
I am not sure that this is even possible or makes sense if the platform
is not running. At the moment I can access the log through my plugin's
getLog() method (in my class that extends
org.eclipse.core.runtime.Plugin), but when I try to log messages to it I
get an assertion failed exception because the platform is not running.
It seems like I have to tell the logger that I want to use the
development platform that launched the standalone JUnit test. Does
anyone know how to do this, or are there any suggestions for a better
way to achieve my goal?
Henry McEuen
|
|
|
Powered by
FUDForum. Page generated in 0.06047 seconds