Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » GLA: translate custom log to CBE format
GLA: translate custom log to CBE format [message #113834] Tue, 02 October 2007 15:32 Go to next message
Eclipse UserFriend
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 #114031 is a reply to message #113834] Thu, 04 October 2007 06:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matthias.goettler.mathema.de

Sorry I forgot, but of course my adapter-file may at least be of some
help... :-)

<?xml version="1.0" encoding="UTF-8"?>
<adapter:Adapter
xmlns:adapter="http://www.eclipse.org/hyades/schema/Adapter.xsd"
xmlns:cc=" http://www.eclipse.org/hyades/schema/ComponentConfiguration. xsd"
xmlns:ex="http://www.eclipse.org/hyades/schema/Extractor.xsd"
xmlns:fmt="http://www.eclipse.org/hyades/schema/Formatter.xsd"
xmlns:hga="http://www.eclipse.org/hyades/schema/Context.xsd"
xmlns:op="http://www.eclipse.org/hyades/schema/Outputter.xsd"
xmlns:parser="http://www.eclipse.org/hyades/schema/Parser.xsd"
xmlns:pu="http://www.eclipse.org/hyades/schema/ProcessUnit.xsd"
xmlns:sensor="http://www.eclipse.org/hyades/schema/Sensor.xsd">
<hga:Contexts>
<hga:Context description="Context Instance for the current component"
executableClass="org.eclipse.hyades.logging.adapter.impl.BasicContext "
implementationCreationDate="2007-09-22T10:01:36"
implementationVersion="1.0" loggingLevel="30" name="Basic Context
Implementation" role="context" roleCreationDate="2007-09-22T10:01:36"
roleVersion="1.0" uniqueID="NAF0248108E211DC80009FA44E6CBF65">
<hga:Component description="Operating System file sensor"
executableClass=" org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSenso r "
implementationCreationDate="2007-09-22T10:01:37"
implementationVersion="1.0" loggingLevel="30" name="OS File Sensor"
role="sensor" roleCreationDate="2007-09-22T10:01:37" roleVersion="1.0"
uniqueID="NB118F3108E211DC80009FA44E6CBF65"/>
<hga:Component description="This extractor uses regular expression
patterns to identify record delimiters"
executableClass=" org.eclipse.hyades.logging.adapter.extractors.RegularExpress ionExtractor "
implementationCreationDate="2007-09-22T10:01:37"
implementationVersion="1.0" loggingLevel="30" name="Regular Expression
Extractor" role="messageExtractor" roleCreationDate="2007-09-22T10:01:37"
roleVersion="1.0" uniqueID="NB18BB2108E211DC80009FA44E6CBF65"/>
<hga:Component description="Regular expression parser"
executableClass="org.eclipse.hyades.logging.adapter.parsers.Parser "
implementationCreationDate="2007-09-22T10:01:38"
implementationVersion="1.0" loggingLevel="30" name="Generic Parser"
role="parser" roleCreationDate="2007-09-22T10:01:38" roleVersion="1.0"
uniqueID="NB1B2C2008E211DC80009FA44E6CBF65"/>
<hga:Component description="CBE Formatter"
executableClass="org.eclipse.hyades.logging.adapter.formatters.CBEFormatter "
implementationCreationDate="2007-09-22T10:01:38"
implementationVersion="1.0" loggingLevel="30" name="CBE Formatter"
role="formatter" roleCreationDate="2007-09-22T10:01:38" roleVersion="1.0"
uniqueID="NBAC96B108E211DC80009FA44E6CBF65"/>
<hga:Component description="CommonBaseEvent File Outputter"
executableClass=" org.eclipse.hyades.logging.adapter.outputters.CBEFileOutputt er "
implementationCreationDate="2007-10-01T14:01:54"
implementationVersion="1.0" loggingLevel="30" name="CommonBaseEvent File
Outputter" role="outputter" roleCreationDate="2007-10-01T14:01:54"/>
</hga:Context>
</hga:Contexts>
<cc:Configuration description="The component level configurations for
this Adaptor" uniqueID="NAF0248008E211DCB5F49FA44E6CBF65">
<cc:ContextInstance charset="" continuousOperation="false"
description="Context Instance for the current component" isoCountryCode=""
isoLanguageCode="" maximumIdleTime="" pauseInterval=""
uniqueID="NAF0248108E211DC80009FA44E6CBF65">
<cc:Sensor description="A single file sensor"
uniqueID="NB118F3108E211DC80009FA44E6CBF65" confidenceBufferSize="1024"
maximumBlocking="5" type="SingleFileSensor">
<pu:Property propertyName="directory"
propertyValue=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "/>
<pu:Property propertyName="fileName" propertyValue="debug.log"/>
<sensor:SingleFileSensor
directory=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "
fileName="debug.log"/>
</cc:Sensor>
<ex:Extractor description="This extractor uses regular expression
patterns to identify record delimiters"
uniqueID="NB18BB2108E211DC80009FA44E6CBF65" containsLineBreaks="true"
endPattern="$" includeEndPattern="true" includeStartPattern="true"
lineBreakSymbol="" replaceLineBreaks="false" startPattern="^#"/>
<cc:Parser separatorToken="\*"
uniqueID="NB1B2C2008E211DC80009FA44E6CBF65">
<parser:RuleElement index="NB1D761008E211DC80009FA44E6CBF65"
isChildChoice="false" isRequiredByParent="false" name="CommonBaseEvent">
<parser:RuleElement index="N587413F08E211DC80009FA44E6CBF65"
name="sourceComponentId">
<parser:RuleAttribute index="N587414008E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="component"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
\[([^\]]*)\.([^\]]*)\] \*(.*)" substitute="$4" useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="N587414108E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="componentIdType"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)" substitute="NONE"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="N587414208E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="componentType"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)" substitute="javaPkg"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="N587414308E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="location"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)" substitute="1"
useBuiltInFunction="true"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="N587414408E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="locationType"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)" substitute="1"
useBuiltInFunction="true"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="N587414508E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="subComponent"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
\[([^\]]*)\.([^\]]*)\] \*(.*)" substitute="$5" useBuiltInFunction="false"/>
</parser:RuleAttribute>
</parser:RuleElement>
<parser:RuleElement index="N69D165708E911DC80009FA44E6CBF65"
isChildChoice="true" name="situation">
<parser:RuleElement index="N9E434DA08F311DC8000CC0252880C4F"
name="ReportSituation">
<parser:RuleAttribute
index="N9E434DB08F311DC8000CC0252880C4F" isRequiredByParent="false"
name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)" substitute="INTERNAL"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute
index="N9E434DC08F311DC8000CC0252880C4F" isRequiredByParent="false"
name="reportCategory" usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)" substitute="DEBUG"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
</parser:RuleElement>
</parser:RuleElement>
<parser:RuleElement index="N4A4056608EA11DC80009FA44E6CBF65"
name="msgDataElement">
<parser:RuleAttribute index="N679AFB208EA11DC80009FA44E6CBF65"
name="msgId" usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
\[([^\]]*)\.([^\]]*)\] \*(.*)\.(.*)\*(.*)" substitute="$7"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="NE39543608EA11DC80009FA44E6CBF65"
name="msgCatalog" usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
\[([^\]]*)\.([^\]]*)\] \*(.*)\.(.*)\*(.*)" substitute="$6"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
</parser:RuleElement>
<parser:RuleAttribute index="NBAA25B008E211DC80009FA44E6CBF65"
isRequiredByParent="false" name="creationTime"
usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^(.*)\*(.*)\* CID(.*)"
substitute="$2" useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="NF945F3E08E311DC80009FA44E6CBF65"
name="msg" usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="(.*) \* (.*)$" substitute="$2"
useBuiltInFunction="false"/>
</parser:RuleAttribute>
<parser:RuleAttribute index="NE28CB5108EB11DC80009FA44E6CBF65"
name="sequenceNumber" usePreviousMatchSubstitutionAsDefault="false"/>
<parser:RuleAttribute index="NE266C0D08EB11DC80009FA44E6CBF65"
name="localInstanceId" usePreviousMatchSubstitutionAsDefault="false"/>
<parser:RuleAttribute index="N4F08D0208EB11DC80009FA44E6CBF65"
name="severity" usePreviousMatchSubstitutionAsDefault="false">
<SubstitutionRule match="^#(.*) \* (.*)" substitute="$1"
substitutionExtensionClass="de.mathema.swmtgoet.mysubstitutions.SeveritySubstitution "
useBuiltInFunction="false"/>
</parser:RuleAttribute>
</parser:RuleElement>
</cc:Parser>
<fmt:Formatter description="CBE Formatter"
uniqueID="NBAC96B108E211DC80009FA44E6CBF65"/>
<cc:Outputter description="CommonBaseEvent File Outputter"
disabled="false" uniqueID="N21DBE12001511DC8000E48FE951420B"
type="SingleFileOutputter">
<pu:Property propertyName="directory"
propertyValue=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "/>
<pu:Property propertyName="fileName"
propertyValue="cbeoutput.log"/>
<op:SingleFileOutputterType
directory=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "
fileName="cbeoutput.log"/>
</cc:Outputter>
</cc:ContextInstance>
</cc:Configuration>
</adapter:Adapter>
Re: GLA: translate custom log to CBE format [message #114397 is a reply to message #114031] Fri, 05 October 2007 20:43 Go to previous messageGo to next message
Dave Smith is currently offline Dave SmithFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Matthias,

I tried your adapter file and found it was incorrect. The outputter
configuration is missing the uniqueID attribute:

<hga:Component description="CommonBaseEvent File Outputter"

executableClass="org.eclipse.hyades.logging.adapter.outputters.CBEFileOutput
ter"
implementationCreationDate="2007-10-01T14:01:54"
implementationVersion="1.0" loggingLevel="30" name="CommonBaseEvent File
Outputter" role="outputter" roleCreationDate="2007-10-01T14:01:54"/>

It should be:

<hga:Component description="CommonBaseEvent File Outputter"
executableClass="org.eclipse.hyades.logging.adapter.outputters.CBEFileOutput
ter"
implementationCreationDate="2007-10-01T14:01:54"
implementationVersion="1.0" loggingLevel="30" name="CommonBaseEvent File
Outputter" role="outputter" roleCreationDate="2007-10-01T14:01:54"
roleVersion="1.0" uniqueID="N21DBE12001511DC8000E48FE951420B"/>

Did you create it with the Adapter Configuration Editor that comes with TPTP
or did you create it by hand?

Once I fixed this, getProperties() in CBEFileOutputter.update returned a
hash table with the directory and fileName properties from the adapter file.

Can you try fixing the adapter and running again.

What version of TPTP are you using?


Dave


"Matthias Goettler" <matthias.goettler@mathema.de> wrote in message
news:778b0520bd6ba28a4608ef4ceb2740ff$1@www.eclipse.org...
> Sorry I forgot, but of course my adapter-file may at least be of some
> help... :-)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <adapter:Adapter
> xmlns:adapter="http://www.eclipse.org/hyades/schema/Adapter.xsd"
> xmlns:cc=" http://www.eclipse.org/hyades/schema/ComponentConfiguration. xsd"
> xmlns:ex="http://www.eclipse.org/hyades/schema/Extractor.xsd"
> xmlns:fmt="http://www.eclipse.org/hyades/schema/Formatter.xsd"
> xmlns:hga="http://www.eclipse.org/hyades/schema/Context.xsd"
> xmlns:op="http://www.eclipse.org/hyades/schema/Outputter.xsd"
> xmlns:parser="http://www.eclipse.org/hyades/schema/Parser.xsd"
> xmlns:pu="http://www.eclipse.org/hyades/schema/ProcessUnit.xsd"
> xmlns:sensor="http://www.eclipse.org/hyades/schema/Sensor.xsd">
> <hga:Contexts>
> <hga:Context description="Context Instance for the current component"
> executableClass="org.eclipse.hyades.logging.adapter.impl.BasicContext "
> implementationCreationDate="2007-09-22T10:01:36"
> implementationVersion="1.0" loggingLevel="30" name="Basic Context
> Implementation" role="context" roleCreationDate="2007-09-22T10:01:36"
> roleVersion="1.0" uniqueID="NAF0248108E211DC80009FA44E6CBF65">
> <hga:Component description="Operating System file sensor"
>
executableClass="org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSens
or"
> implementationCreationDate="2007-09-22T10:01:37"
> implementationVersion="1.0" loggingLevel="30" name="OS File Sensor"
> role="sensor" roleCreationDate="2007-09-22T10:01:37" roleVersion="1.0"
> uniqueID="NB118F3108E211DC80009FA44E6CBF65"/>
> <hga:Component description="This extractor uses regular expression
> patterns to identify record delimiters"
>
executableClass="org.eclipse.hyades.logging.adapter.extractors.RegularExpres
sionExtractor"
> implementationCreationDate="2007-09-22T10:01:37"
> implementationVersion="1.0" loggingLevel="30" name="Regular Expression
> Extractor" role="messageExtractor" roleCreationDate="2007-09-22T10:01:37"
> roleVersion="1.0" uniqueID="NB18BB2108E211DC80009FA44E6CBF65"/>
> <hga:Component description="Regular expression parser"
> executableClass="org.eclipse.hyades.logging.adapter.parsers.Parser "
> implementationCreationDate="2007-09-22T10:01:38"
> implementationVersion="1.0" loggingLevel="30" name="Generic Parser"
> role="parser" roleCreationDate="2007-09-22T10:01:38" roleVersion="1.0"
> uniqueID="NB1B2C2008E211DC80009FA44E6CBF65"/>
> <hga:Component description="CBE Formatter"
>
executableClass="org.eclipse.hyades.logging.adapter.formatters.CBEFormatter "
> implementationCreationDate="2007-09-22T10:01:38"
> implementationVersion="1.0" loggingLevel="30" name="CBE Formatter"
> role="formatter" roleCreationDate="2007-09-22T10:01:38" roleVersion="1.0"
> uniqueID="NBAC96B108E211DC80009FA44E6CBF65"/>
> <hga:Component description="CommonBaseEvent File Outputter"
>
executableClass="org.eclipse.hyades.logging.adapter.outputters.CBEFileOutput
ter"
> implementationCreationDate="2007-10-01T14:01:54"
> implementationVersion="1.0" loggingLevel="30" name="CommonBaseEvent File
> Outputter" role="outputter" roleCreationDate="2007-10-01T14:01:54"/>
> </hga:Context>
> </hga:Contexts>
> <cc:Configuration description="The component level configurations for
> this Adaptor" uniqueID="NAF0248008E211DCB5F49FA44E6CBF65">
> <cc:ContextInstance charset="" continuousOperation="false"
> description="Context Instance for the current component" isoCountryCode=""
> isoLanguageCode="" maximumIdleTime="" pauseInterval=""
> uniqueID="NAF0248108E211DC80009FA44E6CBF65">
> <cc:Sensor description="A single file sensor"
> uniqueID="NB118F3108E211DC80009FA44E6CBF65" confidenceBufferSize="1024"
> maximumBlocking="5" type="SingleFileSensor">
> <pu:Property propertyName="directory"
>
propertyValue=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL o
gParser\logRepo"/>
> <pu:Property propertyName="fileName" propertyValue="debug.log"/>
> <sensor:SingleFileSensor
>
directory=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogPar
ser\logRepo"
> fileName="debug.log"/>
> </cc:Sensor>
> <ex:Extractor description="This extractor uses regular expression
> patterns to identify record delimiters"
> uniqueID="NB18BB2108E211DC80009FA44E6CBF65" containsLineBreaks="true"
> endPattern="$" includeEndPattern="true" includeStartPattern="true"
> lineBreakSymbol="" replaceLineBreaks="false" startPattern="^#"/>
> <cc:Parser separatorToken="\*"
> uniqueID="NB1B2C2008E211DC80009FA44E6CBF65">
> <parser:RuleElement index="NB1D761008E211DC80009FA44E6CBF65"
> isChildChoice="false" isRequiredByParent="false" name="CommonBaseEvent">
> <parser:RuleElement index="N587413F08E211DC80009FA44E6CBF65"
> name="sourceComponentId">
> <parser:RuleAttribute index="N587414008E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="component"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)" substitute="$4"
useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414108E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="componentIdType"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="NONE"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414208E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="componentType"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="javaPkg"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414308E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="location"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="1"
> useBuiltInFunction="true"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414408E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="locationType"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="1"
> useBuiltInFunction="true"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414508E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="subComponent"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)" substitute="$5"
useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> <parser:RuleElement index="N69D165708E911DC80009FA44E6CBF65"
> isChildChoice="true" name="situation">
> <parser:RuleElement index="N9E434DA08F311DC8000CC0252880C4F"
> name="ReportSituation">
> <parser:RuleAttribute
> index="N9E434DB08F311DC8000CC0252880C4F" isRequiredByParent="false"
> name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="INTERNAL"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute
> index="N9E434DC08F311DC8000CC0252880C4F" isRequiredByParent="false"
> name="reportCategory" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="DEBUG"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> </parser:RuleElement>
> <parser:RuleElement index="N4A4056608EA11DC80009FA44E6CBF65"
> name="msgDataElement">
> <parser:RuleAttribute index="N679AFB208EA11DC80009FA44E6CBF65"
> name="msgId" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)\.(.*)\*(.*)" substitute="$7"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="NE39543608EA11DC80009FA44E6CBF65"
> name="msgCatalog" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)\.(.*)\*(.*)" substitute="$6"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> <parser:RuleAttribute index="NBAA25B008E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="creationTime"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\* CID(.*)"
> substitute="$2" useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="NF945F3E08E311DC80009FA44E6CBF65"
> name="msg" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="(.*) \* (.*)$" substitute="$2"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="NE28CB5108EB11DC80009FA44E6CBF65"
> name="sequenceNumber" usePreviousMatchSubstitutionAsDefault="false"/>
> <parser:RuleAttribute index="NE266C0D08EB11DC80009FA44E6CBF65"
> name="localInstanceId" usePreviousMatchSubstitutionAsDefault="false"/>
> <parser:RuleAttribute index="N4F08D0208EB11DC80009FA44E6CBF65"
> name="severity" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^#(.*) \* (.*)" substitute="$1"
>
substitutionExtensionClass="de.mathema.swmtgoet.mysubstitutions.SeveritySubs
titution"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> </cc:Parser>
> <fmt:Formatter description="CBE Formatter"
> uniqueID="NBAC96B108E211DC80009FA44E6CBF65"/>
> <cc:Outputter description="CommonBaseEvent File Outputter"
> disabled="false" uniqueID="N21DBE12001511DC8000E48FE951420B"
> type="SingleFileOutputter">
> <pu:Property propertyName="directory"
>
propertyValue=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL o
gParser\logRepo"/>
> <pu:Property propertyName="fileName"
> propertyValue="cbeoutput.log"/>
> <op:SingleFileOutputterType
>
directory=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogPar
ser\logRepo"
> fileName="cbeoutput.log"/>
> </cc:Outputter>
> </cc:ContextInstance>
> </cc:Configuration>
> </adapter:Adapter>
>
Re: GLA: translate custom log to CBE format [message #114413 is a reply to message #114031] Fri, 05 October 2007 20:48 Go to previous messageGo to next message
Rohit Shetty is currently offline Rohit ShettyFriend
Messages: 9
Registered: July 2009
Junior Member
Hi Matthias,
I noticed that you have actually not associated the Context for the CBE
Outputter with the Instance in the configuration. I have attached a
screenshot that should tell you how to do it. I have also modified the
adapter for these changes.

Let me know if this works for you.

Thanks,

Rohit Shetty

"Matthias Goettler" <matthias.goettler@mathema.de> wrote in message
news:778b0520bd6ba28a4608ef4ceb2740ff$1@www.eclipse.org...
> Sorry I forgot, but of course my adapter-file may at least be of some
> help... :-)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <adapter:Adapter
> xmlns:adapter="http://www.eclipse.org/hyades/schema/Adapter.xsd"
> xmlns:cc=" http://www.eclipse.org/hyades/schema/ComponentConfiguration. xsd"
> xmlns:ex="http://www.eclipse.org/hyades/schema/Extractor.xsd"
> xmlns:fmt="http://www.eclipse.org/hyades/schema/Formatter.xsd"
> xmlns:hga="http://www.eclipse.org/hyades/schema/Context.xsd"
> xmlns:op="http://www.eclipse.org/hyades/schema/Outputter.xsd"
> xmlns:parser="http://www.eclipse.org/hyades/schema/Parser.xsd"
> xmlns:pu="http://www.eclipse.org/hyades/schema/ProcessUnit.xsd"
> xmlns:sensor="http://www.eclipse.org/hyades/schema/Sensor.xsd">
> <hga:Contexts>
> <hga:Context description="Context Instance for the current component"
> executableClass="org.eclipse.hyades.logging.adapter.impl.BasicContext "
> implementationCreationDate="2007-09-22T10:01:36"
> implementationVersion="1.0" loggingLevel="30" name="Basic Context
> Implementation" role="context" roleCreationDate="2007-09-22T10:01:36"
> roleVersion="1.0" uniqueID="NAF0248108E211DC80009FA44E6CBF65">
> <hga:Component description="Operating System file sensor"
> executableClass=" org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSenso r "
> implementationCreationDate="2007-09-22T10:01:37"
> implementationVersion="1.0" loggingLevel="30" name="OS File Sensor"
> role="sensor" roleCreationDate="2007-09-22T10:01:37" roleVersion="1.0"
> uniqueID="NB118F3108E211DC80009FA44E6CBF65"/>
> <hga:Component description="This extractor uses regular expression
> patterns to identify record delimiters"
> executableClass=" org.eclipse.hyades.logging.adapter.extractors.RegularExpress ionExtractor "
> implementationCreationDate="2007-09-22T10:01:37"
> implementationVersion="1.0" loggingLevel="30" name="Regular Expression
> Extractor" role="messageExtractor" roleCreationDate="2007-09-22T10:01:37"
> roleVersion="1.0" uniqueID="NB18BB2108E211DC80009FA44E6CBF65"/>
> <hga:Component description="Regular expression parser"
> executableClass="org.eclipse.hyades.logging.adapter.parsers.Parser "
> implementationCreationDate="2007-09-22T10:01:38"
> implementationVersion="1.0" loggingLevel="30" name="Generic Parser"
> role="parser" roleCreationDate="2007-09-22T10:01:38" roleVersion="1.0"
> uniqueID="NB1B2C2008E211DC80009FA44E6CBF65"/>
> <hga:Component description="CBE Formatter"
> executableClass="org.eclipse.hyades.logging.adapter.formatters.CBEFormatter "
> implementationCreationDate="2007-09-22T10:01:38"
> implementationVersion="1.0" loggingLevel="30" name="CBE Formatter"
> role="formatter" roleCreationDate="2007-09-22T10:01:38" roleVersion="1.0"
> uniqueID="NBAC96B108E211DC80009FA44E6CBF65"/>
> <hga:Component description="CommonBaseEvent File Outputter"
> executableClass=" org.eclipse.hyades.logging.adapter.outputters.CBEFileOutputt er "
> implementationCreationDate="2007-10-01T14:01:54"
> implementationVersion="1.0" loggingLevel="30" name="CommonBaseEvent File
> Outputter" role="outputter" roleCreationDate="2007-10-01T14:01:54"/>
> </hga:Context>
> </hga:Contexts>
> <cc:Configuration description="The component level configurations for
> this Adaptor" uniqueID="NAF0248008E211DCB5F49FA44E6CBF65">
> <cc:ContextInstance charset="" continuousOperation="false"
> description="Context Instance for the current component" isoCountryCode=""
> isoLanguageCode="" maximumIdleTime="" pauseInterval=""
> uniqueID="NAF0248108E211DC80009FA44E6CBF65">
> <cc:Sensor description="A single file sensor"
> uniqueID="NB118F3108E211DC80009FA44E6CBF65" confidenceBufferSize="1024"
> maximumBlocking="5" type="SingleFileSensor">
> <pu:Property propertyName="directory"
> propertyValue=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "/>
> <pu:Property propertyName="fileName" propertyValue="debug.log"/>
> <sensor:SingleFileSensor
> directory=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "
> fileName="debug.log"/>
> </cc:Sensor>
> <ex:Extractor description="This extractor uses regular expression
> patterns to identify record delimiters"
> uniqueID="NB18BB2108E211DC80009FA44E6CBF65" containsLineBreaks="true"
> endPattern="$" includeEndPattern="true" includeStartPattern="true"
> lineBreakSymbol="" replaceLineBreaks="false" startPattern="^#"/>
> <cc:Parser separatorToken="\*"
> uniqueID="NB1B2C2008E211DC80009FA44E6CBF65">
> <parser:RuleElement index="NB1D761008E211DC80009FA44E6CBF65"
> isChildChoice="false" isRequiredByParent="false" name="CommonBaseEvent">
> <parser:RuleElement index="N587413F08E211DC80009FA44E6CBF65"
> name="sourceComponentId">
> <parser:RuleAttribute index="N587414008E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="component"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)" substitute="$4"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414108E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="componentIdType"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="NONE"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414208E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="componentType"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="javaPkg"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414308E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="location"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="1"
> useBuiltInFunction="true"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414408E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="locationType"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="1"
> useBuiltInFunction="true"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="N587414508E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="subComponent"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)" substitute="$5"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> <parser:RuleElement index="N69D165708E911DC80009FA44E6CBF65"
> isChildChoice="true" name="situation">
> <parser:RuleElement index="N9E434DA08F311DC8000CC0252880C4F"
> name="ReportSituation">
> <parser:RuleAttribute
> index="N9E434DB08F311DC8000CC0252880C4F" isRequiredByParent="false"
> name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="INTERNAL"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute
> index="N9E434DC08F311DC8000CC0252880C4F" isRequiredByParent="false"
> name="reportCategory" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)" substitute="DEBUG"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> </parser:RuleElement>
> <parser:RuleElement index="N4A4056608EA11DC80009FA44E6CBF65"
> name="msgDataElement">
> <parser:RuleAttribute index="N679AFB208EA11DC80009FA44E6CBF65"
> name="msgId" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)\.(.*)\*(.*)" substitute="$7"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="NE39543608EA11DC80009FA44E6CBF65"
> name="msgCatalog" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\*(.*)\*
> \[([^\]]*)\.([^\]]*)\] \*(.*)\.(.*)\*(.*)" substitute="$6"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> <parser:RuleAttribute index="NBAA25B008E211DC80009FA44E6CBF65"
> isRequiredByParent="false" name="creationTime"
> usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^(.*)\*(.*)\* CID(.*)"
> substitute="$2" useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="NF945F3E08E311DC80009FA44E6CBF65"
> name="msg" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="(.*) \* (.*)$" substitute="$2"
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> <parser:RuleAttribute index="NE28CB5108EB11DC80009FA44E6CBF65"
> name="sequenceNumber" usePreviousMatchSubstitutionAsDefault="false"/>
> <parser:RuleAttribute index="NE266C0D08EB11DC80009FA44E6CBF65"
> name="localInstanceId" usePreviousMatchSubstitutionAsDefault="false"/>
> <parser:RuleAttribute index="N4F08D0208EB11DC80009FA44E6CBF65"
> name="severity" usePreviousMatchSubstitutionAsDefault="false">
> <SubstitutionRule match="^#(.*) \* (.*)" substitute="$1"
> substitutionExtensionClass="de.mathema.swmtgoet.mysubstitutions.SeveritySubstitution "
> useBuiltInFunction="false"/>
> </parser:RuleAttribute>
> </parser:RuleElement>
> </cc:Parser>
> <fmt:Formatter description="CBE Formatter"
> uniqueID="NBAC96B108E211DC80009FA44E6CBF65"/>
> <cc:Outputter description="CommonBaseEvent File Outputter"
> disabled="false" uniqueID="N21DBE12001511DC8000E48FE951420B"
> type="SingleFileOutputter">
> <pu:Property propertyName="directory"
> propertyValue=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "/>
> <pu:Property propertyName="fileName"
> propertyValue="cbeoutput.log"/>
> <op:SingleFileOutputterType
> directory=" F:\docs\Campus\Ab_ins_Tipi\workspace\de.mathema.swmtgoet.MyL ogParser\logRepo "
> fileName="cbeoutput.log"/>
> </cc:Outputter>
> </cc:ContextInstance>
> </cc:Configuration>
> </adapter:Adapter>
>



  • Attachment: a.adapter
    (Size: 9.97KB, Downloaded 244 times)
  • Attachment: a.JPG
    (Size: 146.69KB, Downloaded 178 times)
Re: GLA: translate custom log to CBE format [message #115236 is a reply to message #114397] Thu, 11 October 2007 07:47 Go to previous message
Eclipse UserFriend
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
Previous Topic:help! CoreException
Next Topic:TPTP AGR 4.4 results
Goto Forum:
  


Current Time: Tue Apr 23 16:34:24 GMT 2024

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

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

Back to the top