Where to log errors? [message #141394] |
Wed, 08 October 2003 16:48 |
Eclipse User |
|
|
|
Originally posted by: heather.hotmail.com
Hi,
I have developed a plugin application to the Eclipse platform. I'm trying
to set up a logging mechanism so that useful error messages from runtime
exceptions or other error conditions can be logged into a file on the
local file system. Currently I'm using
ResourcesPlugin.getPlugin().getLog().addLogListener(ILogList ener) to catch
the error messages and this part works ok. My question is what would be
the recommended way to put the caught error messages to an external file?
There is a ".log" file under "workspace/.metadata" directory, can I export
the error messages from my plugin to that file? If so is there a
convenient way to get a reference to that file? Or maybe a separate
logging file makes more sense? Any suggestions?
Thanks in advance!
Heather
|
|
|
Re: Where to log errors? [message #141433 is a reply to message #141394] |
Wed, 08 October 2003 18:11 |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO--SPAM.us.ibm.com
You get access to the .log file through your Plugin class. There is a
message called getLog() on Plugin.class which returns the logger, and
you use log(IStatus) to log anything. You need to wrapper any message
into a Status to be able to log it.
Rich
|
|
|
Powered by
FUDForum. Page generated in 0.03058 seconds