Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Populate the Log View
Populate the Log View [message #10543] Wed, 16 March 2005 10:11 Go to next message
Eclipse User
Originally posted by: lars._ohlen_nospm.se

Hi,

While attending the EclipseCon tutorial #22 we got a working HCE Agent that
produces random figures and
sends data back to the Eclipse client. The data can then be visualized in
the statstical view. Workd fine.

The data sent back is XML fragments in the format
<ContiguousObservation memberDescriptor="" time="" value="" />

I think that model is updated using this type of

//update ui
ProfileEvent event = UIPlugin.getDefault().getProfileEvent();

event.setSource(agent.getAgentProxy());
event.setType(ProfileEvent.START_MONITOR);
UIPlugin.getDefault().notifyProfileEventListener(event);


I need to create an Agent that extracts logging data from a communication
device (e.g. not a file). To do this we
now have written our own Agent that sends CBE events back to the client.

The question is how can we populate the Log View using the same technique as
above? Futhermore I would like
to know if there are some corresponding log fragments as for the statistical
XML fragments (ContiguousObservation)?


BR

Lars
Re: Populate the Log View [message #11429 is a reply to message #10543] Mon, 21 March 2005 10:45 Go to previous message
Paul Slauenwhite is currently offline Paul Slauenwhite
Messages: 970
Registered: July 2009
Senior Member
Hi Lars,
To answer your second question first - the Log View is populated with
Common Base Event XML data. As such, all content is defined by the Common
Base Event v1.0.1 specification.

As for your first question,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=87304 will address providing a
sample for leveraging local/remote Logging Agent support. Since the Log
View is populated with Common Base Event XML data, serialize the Common Base
Events to XML and write them to a Logging Agent. For example:

import org.eclipse.hyades.logging.core.LoggingAgent;

LoggingAgent loggingAgent = new LoggingAgent("myLoggingAgent");

loggingAgent.write(EventFormatter.toCanonicalXMLString(myCom monBaseEvent));

You may use the workbench to attach to the Logging Agent on the server
machine (Run > Profile... > Attach - Java process > New > Host > <remote
machine> > Agents > Refresh > <your named logging agent>).

For the launcher code, consult the EclipseCon tutorial code that Antony
Miguel wrote for launching a statistical agent (http://www.eclipse.org/tptp/
> Documentation > EclipseCon 2005 Tutorials > Using TPTP Logging and
Monitoring Tools > Source code).

Paul

"Lars" <lars@_ohlen_nospm.se> wrote in message
news:d19ibf$hn9$1@www.eclipse.org...
> Hi,
>
> While attending the EclipseCon tutorial #22 we got a working HCE Agent
that
> produces random figures and
> sends data back to the Eclipse client. The data can then be visualized in
> the statstical view. Workd fine.
>
> The data sent back is XML fragments in the format
> <ContiguousObservation memberDescriptor="" time="" value="" />
>
> I think that model is updated using this type of
>
> //update ui
> ProfileEvent event = UIPlugin.getDefault().getProfileEvent();
>
> event.setSource(agent.getAgentProxy());
> event.setType(ProfileEvent.START_MONITOR);
> UIPlugin.getDefault().notifyProfileEventListener(event);
>
>
> I need to create an Agent that extracts logging data from a communication
> device (e.g. not a file). To do this we
> now have written our own Agent that sends CBE events back to the client.
>
> The question is how can we populate the Log View using the same technique
as
> above? Futhermore I would like
> to know if there are some corresponding log fragments as for the
statistical
> XML fragments (ContiguousObservation)?
>
>
> BR
>
> Lars
>
>
>
Previous Topic:Getting Started... help
Next Topic:Run JUnit Test on Remote Machine
Goto Forum:
  


Current Time: Mon Jul 28 18:36:37 EDT 2014

Powered by FUDForum. Page generated in 0.02105 seconds