Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Programmatic access to development workbench for logging?
Programmatic access to development workbench for logging? [message #266284] Tue, 10 August 2004 11:40
Eclipse UserFriend
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
Previous Topic:Performance of ComboViewer
Next Topic:Eclipse 3.0 Jobs and Progress handling examples?
Goto Forum:
  


Current Time: Thu May 08 14:12:38 EDT 2025

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

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

Back to the top