[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.jdt] Re: Logging
|
Am Wed, 05 Sep 2007 21:03:41 +0200 schrieb Jacek Pospychala:
> Rudolf,
> the common way is to use statushandlers. There is a document about this
> on Wiki: http://wiki.eclipse.org/Platform_UI_Error_Handling
> It's generally about traveling of statuses. You can get a status (eg. if
> you catch CoreException, then coreException.getStatus) or eventually
> throw your own, in any crisis or success situation.
> To handle a status you call StatusManager.getDefault.handle(...);
> So it looks easy and is easy. The way, how statuses are handled (error
> dialog, only log, etc.) can either be suggested directly with a style in
> handle(status, style) method or customized by creating your own status
> handler and registering under org.eclipse.ui.statusHandlers extension point.
> Status contains a name of originating plugin, message, status code and a
> Throwable if it applies. Statuses can also be grouped eg. if they are
> all related to one issue.
> There is also a service at lower lever - in Equinox -
> (org.eclipse.equinox.log) to which you can register to catch up and
> eventually process any errors, but this plugin has to be downloaded
> separately from Equinox.
>
> Of course you can still use log4j in your plugins, and afaik some people
> do this, but it offers something quite different, so I guess which one
> you choose will mainly depend on what you really need.
>
> Rudolf Ziegaus wrote:
Thanks for the extensive info. I think I'll stick to the statushandler
concept.
Rudi