[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Best way to do logging from plugin

Michael Giroux wrote:
What is the official "Eclipse way" of doing logging in a plugin? I found a getLog() method in org.eclipse.core.runtime.Platform, but I cannot tell from the javadocs if this is intended for the type of logging normally done w/ log4j.

I don't know about "best way", but it is the eclipse standard way. Depending on how much of eclipse (vs RCP) that you're using it puts the logs in a standard location, they can be viewed as a text file from the Help>About>Configuration dialog and the Eclipse Error View will display them.


I guess the quesiton would be "what type of logging do you want to do". If you want to log exceptional cases, errors, and the occasional important config message to the user, eclipse getLog() is fine.

If you want the flexible logging that includes the above information but also logs program state and transactions, and can feed it to remote locations later the you would probably want to use log4j.

Later,
PW