Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Where to log errors?
Where to log errors? [message #141394] Wed, 08 October 2003 16:48 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Problem with Adding an action to an object
Next Topic:Customizing the properties of generated build.xml files.
Goto Forum:
  


Current Time: Wed Sep 25 09:35:12 GMT 2024

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

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

Back to the top