GLA: translate custom log to CBE format [message #113834] |
Tue, 02 October 2007 11:32  |
Eclipse User |
|
|
|
Originally posted by: matthias.goettler.mathema.de
Hello all,
I have created a custom adapter file to translate our custom log-format
into a CBE format. From there on, I would have liked to experiment with
symptom analysis and so forth.
Problem was: I created the *.adapter file, but I could not get the
CBEFileOutputter to work. Although I have set directory and fileName
properties as needed, when running the adapter with an application similar
to the RunAdapter example from
http://www.eclipse.org/tptp/monitoring/documents/gla/tptp_44 /GLA_pkg.html,
the application always exits with the following stacktrace:
Adapter configuration file is invalid.
IWAT0377E The CBEFileOutputter configuration is incorrect. The directory
or fileName property is missing or invalid.
org.eclipse.hyades.logging.adapter.AdapterInvalidConfig: IWAT0377E The
CBEFileOutputter configuration is incorrect. The directory or fileName
property is missing or invalid.
at
de.mathema.swmtgoet.mylogparser.CustomOutputter.update(Custo mOutputter.java:238)
at
org.eclipse.hyades.logging.adapter.impl.Component.update(Com ponent.java:237)
at
org.eclipse.hyades.logging.adapter.impl.Context.update(Conte xt.java:524)
at
org.eclipse.hyades.logging.adapter.internal.util.Controller. prepareConfiguration(Controller.java:530)
at org.eclipse.hyades.logging.adapter.Adapter.validate(Adapter. java:137)
I have created a custom outputter derived from Outputter (with the same
implementation as CBEFileOutputter and some verbosity) and found out, that
the values defined for directory and fileName are still null, although
they are defined exactly as for the single file sensor. I then found that
the call to getProperties() in CBEFileOutputter.update() returned null.
So my question is: is this a known behaviour? If so, why does the
mentioned example still contain the error?
My solution is to call getConfiguration() on my adapter, iterate through
all IContexts and through all of their IComponents and check if one of the
IComponents is an instance of my CustomOutputter (or the CBEFileOutputter)
and if so, again set directory and fileName via the API.
Bye
Matthias
|
|
|
|
|
|
Re: GLA: translate custom log to CBE format [message #115236 is a reply to message #114397] |
Thu, 11 October 2007 03:47  |
Eclipse User |
|
|
|
Originally posted by: matthias.goettler.mathema.de
Hello Dave,
I originally tried to create the adapter file using the eclipse editor for
this file format. I have had a look at the raw XML, but only to see
whether there are obvious differences in the part defining the input file
and that for the output file.
Apart from that, I have been adding and removing various types of
outputters, e.g. that for System.out.
I also thought, I had tried adding the ID via the UI, and thought that
this also had not worked.
Anyway: the ID has to be set as you described it, and now it works.
Thanks for your help.
Matthias
|
|
|
Powered by
FUDForum. Page generated in 0.03929 seconds