[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: logging in plugins

Marcus Olk wrote:
As a consequence EVERY single plugin has to implement these
"convenience methods" copy/pasting the same code, which IMHO
is not really convenient.

No. The convenience method given by Bob only called the Status constructor - you can call that constructor directly in code if you don't want to add a convenience method. We're talking about a single line of code here.



Why did Eclipse reinvent the wheel by implementing its own logging mechanism? Why not using log4j?

The Eclipse log mechanism is very minimal, but it suits the needs of the platform. If you require more advanced logging features, by all means use another package such as log4j or java.util.logging. Many plugins do. Log4j is about half the size of the Eclipse 3.1 runtime (and larger than the original Eclipse runtime), so it would be a bit of overkill to pre-req that into the platform when many applications don't need that much logging function.



And: how is a company supposed to deliver an RCP based application that uses non-plugin code that writes into a single log-file if there's not a single logging facility?

I'm not sure what this question is. If you want to forward information written to the Eclipse log to some other logging mechanism used by "non-plugin code", that is possible. You can add a log listener (Platform.addLogListener), and have that listener forward to the logging API used by your non-plugin code.
--