
Signature
Yao Qi <qiyaoltc AT gmail DOT com> GNU/Linux Developer
http://duewayqi.googlepages.com/
linux: No such file or directory
> We write a java tool which could record runtime information, such as
> thread call stacks, of java applications, and these runtime information
[quoted text clipped - 28 lines]
> runtime information could be shown in Eclipse plugin if our tool is
> launched from our Eclipse.
I would look into using log4j. You can easily get the application to log using
log4j. This can be to a file, to stdout, or any other location which log4j
provides - and if it doesn't provide what you want you create your own
logger/appender. You can log to multiple places at the same time, so stdout and
file if you want both.
> How do I get runtime information in Eclipse plugin?
You could parse the output from a log4j log file. You could do as I have done
and implement a log4j RMI client/server logger/appender pair, where the RMI
client is a log4j appender which sends its log messages to a RMI server/logger.
The RMI server could be within your Eclipse plugin. This method also allows
multiple clients to send messages to the same [remote] logger.
> How do I achieve "output switch between Eclipse and stdout" easily?
log4j.configuration. This file controls which log4j loggers/appenders log4j uses
to actually log the messages.

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Yao Qi - 07 Jan 2008 01:26 GMT
> I would look into using log4j. You can easily get the application to log
> using
[quoted text clipped - 4 lines]
> stdout and
> file if you want both.
Seems that log4j is a good choice. I will look at it.
>> How do I get runtime information in Eclipse plugin?
>
[quoted text clipped - 7 lines]
> allows
> multiple clients to send messages to the same [remote] logger.
RMI is what I want. As you said, RMI server is within my Eclipse
plugin, and clients send messages to this server.
>> How do I achieve "output switch between Eclipse and stdout" easily?
>
> log4j.configuration. This file controls which log4j loggers/appenders
> log4j uses
> to actually log the messages.
Best Regards

Signature
Yao Qi <qiyaoltc AT gmail DOT com> GNU/Linux Developer
http://duewayqi.googlepages.com/
linux: No such file or directory