Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 65179 Details for
Bug 170870
Create JUnit testcases to test GLA API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for the adapters.tests module
bugzilla_170870.txt (text/plain), 124.01 KB, created by
Rohit Shetty
on 2007-04-27 05:50:36 EDT
(
hide
)
Description:
Patch for the adapters.tests module
Filename:
MIME Type:
Creator:
Rohit Shetty
Created:
2007-04-27 05:50:36 EDT
Size:
124.01 KB
patch
obsolete
>Index: .settings/org.eclipse.core.resources.prefs >=================================================================== >RCS file: /cvsroot/tptp/test-results/monitor/org.eclipse.hyades.logging.adapter.tests/.settings/org.eclipse.core.resources.prefs,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.core.resources.prefs >--- .settings/org.eclipse.core.resources.prefs 14 Feb 2006 06:52:42 -0000 1.1 >+++ .settings/org.eclipse.core.resources.prefs 27 Apr 2007 09:50:23 -0000 >@@ -1,6 +1,7 @@ >-#Fri Feb 10 10:47:30 EST 2006 >+#Fri Apr 27 03:34:02 IST 2007 > eclipse.preferences.version=1 > encoding//src/org/eclipse/hyades/logging/adapter/tests/TestSensorAndExtractorFilter.java=UTF-8 >+encoding//src/org/eclipse/hyades/logging/adapter/tests/Test_API_tests_Adapter.java=UTF-8 > encoding//src/org/eclipse/hyades/logging/adapter/tests/Test_runtime_execution_tests.java=UTF-8 > encoding//src/org/eclipse/hyades/logging/adapter/tests/Test_runtime_tests.java=UTF-8 > encoding//src/org/eclipse/hyades/logging/adapter/tests/Test_runtime_tests_CBEGeneration_childEDE.java=UTF-8 >Index: src/org/eclipse/hyades/logging/adapter/tests/AllTests.java >=================================================================== >RCS file: /cvsroot/tptp/test-results/monitor/org.eclipse.hyades.logging.adapter.tests/src/org/eclipse/hyades/logging/adapter/tests/AllTests.java,v >retrieving revision 1.3 >diff -u -r1.3 AllTests.java >--- src/org/eclipse/hyades/logging/adapter/tests/AllTests.java 6 Apr 2006 13:17:40 -0000 1.3 >+++ src/org/eclipse/hyades/logging/adapter/tests/AllTests.java 27 Apr 2007 09:50:24 -0000 >@@ -23,80 +23,71 @@ > } > > /** >- * Returns the JUnit test suite that implements the <b>AllTests</b> >- * definition. >+ * Returns the JUnit test suite that implements the <b>AllTests</b> definition. > */ > public static Test suite() { > HyadesTestSuite allTests = new HyadesTestSuite("AllTests"); > allTests.setArbiter(DefaultTestArbiter.INSTANCE).setId( > "FA3EB15B8B1167ED8E251660A37411DA"); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_CBEGeneration_childEDE > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED3499B28FA37511DA")); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_CBEGeneration_longMsg > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED4E1E4A49A37511DA")); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_CBEGeneration_otherData > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED4E20BB49A37511DA")); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_CBEGeneration_otherSituation > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED4E232C49A37511DA")); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_CBEGeneration_sequenceNumber > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED4E257639A37511DA")); >- >- allTests.addTest(((HyadesTestSuite) Test_runtime_tests_FilterBlade.suite()) >+ allTests.addTest(((HyadesTestSuite) Test_runtime_tests_FilterBlade >+ .suite()) > .setTestInvocationId("FA3EB15B8B1167ED74380382A37511DA")); >- > allTests.addTest(((HyadesTestSuite) Test_runtime_tests_MultipleContexts >- .suite()).setTestInvocationId("FA3EB15B8B1167ED743A7469A37511DA")); >- >- allTests >- .addTest(((HyadesTestSuite) Test_runtime_tests_RotatingLogs.suite()) >- .setTestInvocationId("FA3EB15B8B1167ED743CE569A37511DA")); >- >- allTests >- .addTest(((HyadesTestSuite) Test_runtime_tests_TraceLogging.suite()) >- .setTestInvocationId("FA3EB15B8B1167ED743F2F59A37511DA")); >- >- allTests.addTest(((HyadesTestSuite) Test_runtime_execution_tests.suite()) >+ .suite()) >+ .setTestInvocationId("FA3EB15B8B1167ED743A7469A37511DA")); >+ allTests.addTest(((HyadesTestSuite) Test_runtime_tests_RotatingLogs >+ .suite()) >+ .setTestInvocationId("FA3EB15B8B1167ED743CE569A37511DA")); >+ allTests.addTest(((HyadesTestSuite) Test_runtime_tests_TraceLogging >+ .suite()) >+ .setTestInvocationId("FA3EB15B8B1167ED743F2F59A37511DA")); >+ allTests.addTest(((HyadesTestSuite) Test_runtime_execution_tests >+ .suite()) > .setTestInvocationId("FA3EB15B8B1167ED7441A061A37511DA")); >- >- allTests.addTest(((HyadesTestSuite) TestSensorAndExtractorFilter.suite()) >+ allTests.addTest(((HyadesTestSuite) TestSensorAndExtractorFilter >+ .suite()) > .setTestInvocationId("FA3EB15B8B1167ED74465B55A37511DA")); >- >- allTests.addTest(((HyadesTestSuite) Test_runtime_tests_errors_invalidClass >- .suite()).setTestInvocationId("FA3EB15B8B1167ED7448CC4EA37511DA")); >- >+ allTests >+ .addTest(((HyadesTestSuite) Test_runtime_tests_errors_invalidClass >+ .suite()) >+ .setTestInvocationId("FA3EB15B8B1167ED7448CC4EA37511DA")); > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_errors_invalidLogFile > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED744B163EA37511DA")); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_errors_invalidXMLDocument > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED744D873AA37511DA")); >- > allTests > .addTest(((HyadesTestSuite) Test_runtime_tests_errors_schemaValidation > .suite()) > .setTestInvocationId("FA3EB15B8B1167ED744FF83AA37511DA")); >- >- allTests.addTest(((HyadesTestSuite) Test_runtime_tests_TimeParser.suite()) >+ allTests.addTest(((HyadesTestSuite) Test_runtime_tests_TimeParser >+ .suite()) > .setTestInvocationId("D5E0BF1A8587F840EDC66B32C52011DA")); >- >+ allTests.addTest(((HyadesTestSuite) Test_API_tests_Adapter.suite()) >+ .setTestInvocationId("F26B81720BF42159573C8709F4A411DB")); > return allTests; > } > >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tptp/test-results/monitor/org.eclipse.hyades.logging.adapter.tests/META-INF/MANIFEST.MF,v >retrieving revision 1.2 >diff -u -r1.2 MANIFEST.MF >--- META-INF/MANIFEST.MF 23 Feb 2006 22:09:57 -0000 1.2 >+++ META-INF/MANIFEST.MF 27 Apr 2007 09:50:23 -0000 >@@ -6,4 +6,6 @@ > Bundle-Localization: plugin > Require-Bundle: org.eclipse.tptp.monitoring.auto.tests.util, > org.eclipse.hyades.test.tools.core, >+ org.eclipse.hyades.logging.adapter, >+ org.eclipse.hyades.logging.parsers, > org.junit >Index: src/org/eclipse/hyades/logging/adapter/tests/Test_API_tests_Adapter.java >=================================================================== >RCS file: src/org/eclipse/hyades/logging/adapter/tests/Test_API_tests_Adapter.java >diff -N src/org/eclipse/hyades/logging/adapter/tests/Test_API_tests_Adapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/logging/adapter/tests/Test_API_tests_Adapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,329 @@ >+package org.eclipse.hyades.logging.adapter.tests; >+ >+import junit.framework.Test; >+ >+import org.eclipse.hyades.logging.adapter.tests.utils.APITestJUtils; >+import org.eclipse.hyades.test.common.junit.DefaultTestArbiter; >+import org.eclipse.hyades.test.common.junit.HyadesTestCase; >+import org.eclipse.hyades.test.common.junit.HyadesTestSuite; >+import org.eclipse.tptp.monitoring.auto.tests.utils.PropertiesWrapper; >+ >+/** >+ * Generated code for the test suite <b>Test_API_tests_Adapter</b> located at >+ * <i>/org.eclipse.hyades.logging.adapter.tests/junit/apiTests/adapter/Test_API_tests_Adapter.testsuite</i>. >+ */ >+public class Test_API_tests_Adapter extends HyadesTestCase { >+ /** >+ * Constructor for Test_API_tests_Adapter. >+ * @param name >+ */ >+ public Test_API_tests_Adapter(String name) { >+ super(name); >+ } >+ >+ /** >+ * Returns the JUnit test suite that implements the <b>Test_API_tests_Adapter</b> definition. >+ */ >+ public static Test suite() { >+ HyadesTestSuite test_API_tests_Adapter = new HyadesTestSuite( >+ "Test_API_tests_Adapter"); >+ test_API_tests_Adapter.setArbiter(DefaultTestArbiter.INSTANCE).setId( >+ "CB10CF0ADD6E7CCB0B13D6B0F44211DB"); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testValidSetContextConfigPath").setId( >+ "CB10CF0ADD6E7CCB09188670F44311DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB7360EE00F44311DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testInvalidPathSetContextConfigPath").setId( >+ "CB10CF0ADD6E7CCB25D3B820F44311DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB736819F0F44311DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testInvalidAdapterSetContextConfigPath").setId( >+ "CB10CF0ADD6E7CCB56A34B50F44311DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB736A63E0F44311DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testValidSetComponentConfigPath").setId( >+ "CB10CF0ADD6E7CCB5DD83F30F44711DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB9B549A70F44711DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testInvalidPathSetComponentConfigPath").setId( >+ "CB10CF0ADD6E7CCB7645E8B0F44711DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB9B570B70F44711DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testInvalidAdapterSetComponentConfigPath").setId( >+ "CB10CF0ADD6E7CCB85B700E0F44711DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB9B5BC660F44711DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testValidDiffFileSetContextComponentConfigPathAPI").setId( >+ "CB10CF0ADD6E7CCB3DFE6790F47711DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB4E3EDDB0F47711DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testSetLoggingLevelAPI").setId( >+ "CB10CF0ADD6E7CCBE7726430F47B11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBF2A1B400F47B11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testGetLoggingLevelAPI").setId( >+ "CB10CF0ADD6E7CCBAD89E8A0F47C11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBC470A400F47C11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testGetLoggingLevelAPIDefaultValue").setId( >+ "CB10CF0ADD6E7CCBB71106B0F47C11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBC4731500F47C11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testValidGetConfigurationAPI").setId( >+ "CB10CF0ADD6E7CCB3D024590F47D11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB461481C0F47D11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testInvalidGetConfigurationAPI").setId( >+ "CB10CF0ADD6E7CCBC66838D0F47D11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBD08A3750F47D11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testInvalidNoPathGetConfigurationAPI").setId( >+ "CB10CF0ADD6E7CCBDA9DDDF0F47D11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBE37E0DA0F47D11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testSuccessValidateAPI").setId( >+ "CB10CF0ADD6E7CCBE7252730F47E11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB14CA0750F47F11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testFailedNoPathValidateAPI").setId( >+ "CB10CF0ADD6E7CCBF5590470F47E11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB14CEC240F47F11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testFailedValidateAPI").setId( >+ "CB10CF0ADD6E7CCBFEE26C70F47E11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB14D13340F47F11DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testStartThreadDeamonModeAPI").setId( >+ "CB10CF0ADD6E7CCBFACE9C70F47F11DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB04EBE000F48011DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testStartNonThreadModeAPI").setId( >+ "CB10CF0ADD6E7CCB7A25A400F48011DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCB82744210F48011DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testStartInvalidAdapterModeAPI").setId( >+ "CB10CF0ADD6E7CCBCDB2B080F48111DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBD7FD1E90F48111DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testSetLogOutputterAPI").setId( >+ "CB10CF0ADD6E7CCB9C99C2D0F48211DB").setTestInvocationId( >+ "CB10CF0ADD6E7CCBA62574C0F48211DB")); >+ test_API_tests_Adapter >+ .addTest(new Test_API_tests_Adapter("testStopAPI") >+ .setId("CB10CF0ADD6E7CCB2F785530F48311DB") >+ .setTestInvocationId("CB10CF0ADD6E7CCB3FE3ABE0F48311DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testHardStopAPI").setId("CB10CF0ADD6E7CCB35CB2340F48311DB") >+ .setTestInvocationId("CB10CF0ADD6E7CCB3FE61CE0F48311DB")); >+ test_API_tests_Adapter.addTest(new Test_API_tests_Adapter( >+ "testGetStatusAPI").setId("CB10CF0ADD6E7CCBE2A5A040F48311DB") >+ .setTestInvocationId("CB10CF0ADD6E7CCBE9912BE0F48311DB")); >+ return test_API_tests_Adapter; >+ } >+ >+ /** >+ * @see junit.framework.TestCase#setUp() >+ */ >+ protected void setUp() throws Exception { >+ PropertiesWrapper.init("org.eclipse.hyades.logging.adapter.tests"); >+ } >+ >+ /** >+ * @see junit.framework.TestCase#tearDown() >+ */ >+ protected void tearDown() throws Exception { >+ } >+ >+ /** >+ * testValidSetContextConfigPath >+ * @throws Exception >+ */ >+ public void testValidSetContextConfigPath() throws Exception >+ { >+ APITestJUtils.testValidDiffFileSetContextComponentConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter","GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testInvalidPathSetContextConfigPath >+ * @throws Exception >+ */ >+ public void testInvalidPathSetContextConfigPath() throws Exception >+ { >+ APITestJUtils.testInvalidSetContextConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testInvalidAdapterSetContextConfigPath >+ * @throws Exception >+ */ >+ public void testInvalidAdapterSetContextConfigPath() throws Exception { >+ APITestJUtils.testInvalidAdapterSetContextConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/example.log", "GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testValidSetComponentConfigPath >+ * @throws Exception >+ */ >+ public void testValidSetComponentConfigPath() throws Exception >+ { >+ APITestJUtils.testValidDiffFileSetContextComponentConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter","GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testInvalidPathSetComponentConfigPath >+ * @throws Exception >+ */ >+ public void testInvalidPathSetComponentConfigPath() throws Exception >+ { >+ APITestJUtils.testInvalidSetComponentConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testInvalidAdapterSetComponentConfigPath >+ * @throws Exception >+ */ >+ public void testInvalidAdapterSetComponentConfigPath() throws Exception >+ { >+ APITestJUtils.testInvalidAdapterSetComponentConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/example.log", "GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testValidDiffFileSetContextComponentConfigPathAPI >+ * @throws Exception >+ */ >+ public void testValidDiffFileSetContextComponentConfigPathAPI() >+ throws Exception { >+ APITestJUtils.testValidDiffFileSetContextComponentConfigPathAPI("GenericLogAdapter/config/APITests/Adapter/contextConfiguration.xml", "GenericLogAdapter/config/APITests/Adapter/componentConfiguration.xml"); >+ } >+ >+ /** >+ * testSetLoggingLevelAPI >+ * @throws Exception >+ */ >+ public void testSetLoggingLevelAPI() throws Exception >+ { >+ APITestJUtils.testSetLoggingLevelAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testGetLoggingLevelAPI >+ * @throws Exception >+ */ >+ public void testGetLoggingLevelAPI() throws Exception { >+ APITestJUtils.testGetLoggingLevelAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testGetLoggingLevelAPIDefaultValue >+ * @throws Exception >+ */ >+ public void testGetLoggingLevelAPIDefaultValue() throws Exception { >+ APITestJUtils.testGetLoggingLevelAPIDefaultValue("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testValidGetConfigurationAPI >+ * @throws Exception >+ */ >+ public void testValidGetConfigurationAPI() throws Exception { >+ APITestJUtils.testValidGetConfigurationAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testInvalidGetConfigurationAPI >+ * @throws Exception >+ */ >+ public void testInvalidGetConfigurationAPI() throws Exception { >+ APITestJUtils.testInvalidGetConfigurationAPI("GenericLogAdapter/config/APITests/Adapter/invalidConfiguration.adapter"); >+ } >+ >+ /** >+ * testInvalidNoPathGetConfigurationAPI >+ * @throws Exception >+ */ >+ public void testInvalidNoPathGetConfigurationAPI() throws Exception { >+ APITestJUtils.testInvalidNoPathGetConfigurationAPI(); >+ } >+ >+ /** >+ * testSuccessValidateAPI >+ * @throws Exception >+ */ >+ public void testSuccessValidateAPI() throws Exception { >+ APITestJUtils.testSuccessValidateAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testFailedNoPathValidateAPI >+ * @throws Exception >+ */ >+ public void testFailedNoPathValidateAPI() throws Exception { >+ APITestJUtils.testFailedNoPathValidateAPI(); >+ } >+ >+ /** >+ * testFailedValidateAPI >+ * @throws Exception >+ */ >+ public void testFailedValidateAPI() throws Exception { >+ APITestJUtils.testFailedValidateAPI("GenericLogAdapter/config/APITests/Adapter/example.log"); >+ } >+ >+ /** >+ * testStartThreadDeamonModeAPI >+ * @throws Exception >+ */ >+ public void testStartThreadDeamonModeAPI() throws Exception { >+ APITestJUtils.testStartThreadDeamonModeAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testStartNonThreadModeAPI >+ * @throws Exception >+ */ >+ public void testStartNonThreadModeAPI() throws Exception { >+ APITestJUtils.testStartNonThreadModeAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testStartInvalidAdapterModeAPI >+ * @throws Exception >+ */ >+ public void testStartInvalidAdapterModeAPI() throws Exception { >+ APITestJUtils.testStartInvalidAdapterModeAPI(); >+ } >+ >+ /** >+ * testSetLogOutputterAPI >+ * @throws Exception >+ */ >+ public void testSetLogOutputterAPI() throws Exception { >+ APITestJUtils.testSetLogOutputterAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testStopAPI >+ * @throws Exception >+ */ >+ public void testStopAPI() throws Exception { >+ APITestJUtils.testStopAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testHardStopAPI >+ * @throws Exception >+ */ >+ public void testHardStopAPI() throws Exception { >+ APITestJUtils.testHardStopAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+ /** >+ * testGetStatusAPI >+ * @throws Exception >+ */ >+ public void testGetStatusAPI() throws Exception { >+ APITestJUtils.testGetStatusAPI("GenericLogAdapter/config/APITests/Adapter/Valid.adapter"); >+ } >+ >+} >Index: testFiles/GenericLogAdapter/config/APITests/Adapter/componentConfiguration.xml >=================================================================== >RCS file: testFiles/GenericLogAdapter/config/APITests/Adapter/componentConfiguration.xml >diff -N testFiles/GenericLogAdapter/config/APITests/Adapter/componentConfiguration.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ testFiles/GenericLogAdapter/config/APITests/Adapter/componentConfiguration.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,154 @@ >+<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"> >+ <cc:Configuration description="The component level configurations for this adapter" uniqueID="N35B6D900F8511D88000A31D7605087A"> >+ <cc:ContextInstance charset="" continuousOperation="true" description="Context Instance for the current component" isoCountryCode="US" isoLanguageCode="en" maximumIdleTime="50000" pauseInterval="10" uniqueID="N35B6D910F8511D88000A31D7605087A"> >+ <cc:Sensor description="A single file sensor" uniqueID="N3604F900F8511D88000A31D7605087A" confidenceBufferSize="512" fileFooterSize="0" maximumBlocking="10" type="SingleFileSensor"> >+ <pu:Property propertyName="directory" propertyValue="."/> >+ <pu:Property propertyName="fileName" propertyValue="example.log"/> >+ <sensor:SingleFileSensor directory="." fileName="example.log"/> >+ </cc:Sensor> >+ <ex:Extractor description="This extractor uses regular expression patterns to identify record delimiters" uniqueID="N36299800F8511D88000A31D7605087A" containsLineBreaks="true" endPattern="$" includeEndPattern="false" includeStartPattern="true" lineBreakSymbol="" replaceLineBreaks="false" startPattern="^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})|(\S+)"/> >+ <cc:Parser separatorToken="\s+" uniqueID="N3650A800F8511D88000A31D7605087A"> >+ <parser:RuleElement index="N3650A810F8511D88000A31D7605087A" name="CommonBaseEvent"> >+ <parser:RuleElement index="N8CA7C54002A11D88000C6FD28070181" name="sourceComponentId"> >+ <parser:RuleAttribute defaultValue="Apache HTTP Server" index="ND66C0C1002A11D88000C6FD28070181" name="component" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="Unknown" index="N77CD869002A11D88000C6FD28070181" name="subComponent" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="ProductName" index="N12069D2002A11D88000C6FD28070181" name="componentIdType" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute index="N3AB0CD6010F11D88000873B061CB0B3" name="location" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule substitute="" useBuiltInFunction="true"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute index="NCD2CCD7010F11D88000873B061CB0B3" name="locationType" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule substitute="" useBuiltInFunction="true"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="HTTPServer" index="NDE661030DAB11D88000930FA6625271" name="componentType" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N8273E56002C11D88000C6FD28070181" isChildChoice="true" name="situation"> >+ <parser:RuleElement index="NF8AFFE9002F11D88000C6FD28070181" name="RequestSituation"> >+ <parser:RuleAttribute index="N2815562002F11D88000C6FD28070181" isRequiredByParent="true" name="successDisposition" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(2\d{2}|3\d{2}|1\d{2})" positions="8" substitute="SUCCESSFUL"/> >+ <SubstitutionRule match="(2\d{2}|3\d{2}|1\d{2})" positions="9" substitute="SUCCESSFUL"/> >+ <SubstitutionRule match="(4\d{2}|5\d{2})" positions="8" substitute="UNSUCCESSFUL"/> >+ <SubstitutionRule match="(4\d{2}|5\d{2})" positions="9" substitute="UNSUCCESSFUL" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(\"\-\")@@(2\d{2}|3\d{2}|1\d{2})" positions="6@@7" substitute="SUCCESSFUL" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(\"\-\")@@(4\d{2}|5\d{2})" positions="6@@7" substitute="UNSUCCESSFUL" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="REQUEST COMPLETED" index="N30BA5C1002F11D88000C6FD28070181" name="situationQualifier" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="8" substitute="REQUEST INITIATED"/> >+ <SubstitutionRule match="(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="9" substitute="REQUEST INITIATED"/> >+ <SubstitutionRule match="(\"\-\")@@(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="6@@7" substitute="REQUEST INITIATED" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="EXTERNAL" index="NCCBFC40002F11D88000C6FD28070181" name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N224169A084711D8800091856AF4A65C" name="ReportSituation"> >+ <parser:RuleAttribute defaultValue="INTERNAL" index="N224169B084711D8800091856AF4A65C" name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="LOG" index="N224169C084711D8800091856AF4A65C" name="reportCategory" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ </parser:RuleElement> >+ <parser:RuleElement index="NF4E4C51002C11D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NEA78170002C11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0060000002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})" positions="1" substitute="$1"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="Client" index="N2CA0593002C11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="NE6BC644002C11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N9A75941002D11D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NE1B1FE0002D11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="NF0BE880002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(\d{3})" positions="8" substitute="$1"/> >+ <SubstitutionRule match="(\d{3})" positions="9" substitute="$1"/> >+ <SubstitutionRule match="\"\S+\"@@(\d{3})" positions="6@@7" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="return_code" index="NAE6B713002D11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="short" index="NA82DDF4002D11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N704BAD1002D11D88000C6FD28070181" isRequiredByParent="false" name="extendedDataElements"> >+ <parser:RuleElement index="NED77220002D11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0206CE0002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"\S+@@(.*)" positions="6@@7" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="string" index="N84689A4002D11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="File" index="NC265BE1002D11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N7F86201003311D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NB59C730003311D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="NC6013A0003311D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"(\w+)\"" positions="6" substitute="$1"/> >+ <SubstitutionRule match="\"(\w+)" positions="6" substitute="$1"/> >+ <SubstitutionRule match="\"(\S+)\"" positions="6" substitute="$1"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="string" index="NF34CCC4003311D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="method" index="N4B83CE3003311D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="ND054C63078911D880008B85FEE72030" name="extendedDataElements"> >+ <parser:RuleElement index="NE249F10078911D880008B85FEE72030" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0E370F0078911D880008B85FEE72030" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"(\S+)\"" positions="11" substitute="$1" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"(\S+)\"" positions="10" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="Referer" index="ND054C64078911D880008B85FEE72030" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="ND054C65078911D880008B85FEE72030" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N143DCE3078911D880008B85FEE72030" name="extendedDataElements"> >+ <parser:RuleElement index="N281B410078911D880008B85FEE72030" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N52E3670078911D880008B85FEE72030" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^.*\[.*\]\s\"\w+\s+.*\"\s+\S+\s+\S+\s+\"\S+\"\s+\"(.*)\"" positions="" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="User-agent" index="N143DCE4078911D880008B85FEE72030" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="N143DCE5078911D880008B85FEE72030" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="NA3A7573083F11D8800091856AF4A65C" name="extendedDataElements"> >+ <parser:RuleElement index="N1AF0730083F11D8800091856AF4A65C" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N2BEF090083F11D8800091856AF4A65C" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^([^0-9][^0-9\.][^0-9\.].*)" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="CGI Debugging Output" index="NA3A7574083F11D8800091856AF4A65C" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="NA3A7575083F11D8800091856AF4A65C" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="ND88BDA309FD11D88000B70A90A10773" name="extendedDataElements"> >+ <parser:RuleElement index="NFA8B77009FD11D88000B70A90A10773" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N18A21A009FE11D88000B70A90A10773" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="HTTP/.*\"@@(.+)" positions="8@@10" substitute="$1" useBuiltInFunction="false"/> >+ <SubstitutionRule match=".*\"@@(\d+)" positions="7@@9" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="file_size" index="ND88BDA409FD11D88000B70A90A10773" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="ND88BDA509FD11D88000B70A90A10773" name="type" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(HTTP/.*\")@@(.+)" positions="8@@10" substitute="string" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(.*\")@@(\d+)" positions="7@@9" substitute="int" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="0001-01-01T00:00:00.000000+00:00" index="N3650A820F8511D88000A31D7605087A" name="creationTime" usePreviousMatchSubstitutionAsDefault="true"> >+ <SubstitutionRule match="(.*)" positions="4@@5" substitute="$1" timeFormat="[dd/MMM/yyyy:HH:mm:ss@@z]" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute index="N024368D002B11D88000C6FD28070181" name="msg" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^[^"]+(\".*)" substitute="$1"/> >+ <SubstitutionRule match="^([^\d{1,3}][^\.][^\d{1,3}].*)" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="10" index="N230EBD1002C11D88000C6FD28070181" name="severity" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="5\d{2}" positions="8" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="5\d{2}" positions="9" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="4\d{2}" positions="8" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="4\d{2}" positions="9" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"\S+\"@@5\d{2}" positions="6@@7" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"\S+\"@@4\d{2}" positions="6@@7" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+5\d{2}\s+\d+.*" positions="" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+4\d{2}\s+\d+.*" positions="" substitute="40" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ </cc:Parser> >+ <fmt:Formatter description="CBE Formatter" uniqueID="N36C36700F8511D88000A31D7605087A"/> >+ <cc:Outputter description="Default Logging Agent" uniqueID="N36E80600F8511D88000A31D7605087A" type="SingleFileOutputter"> >+ <pu:Property propertyName="directory" propertyValue="."/> >+ <pu:Property propertyName="fileName" propertyValue="example.out"/> >+ <op:SingleFileOutputterType directory="." fileName="example.out"/> >+ </cc:Outputter> >+ </cc:ContextInstance> >+ </cc:Configuration> >+</adapter:Adapter> >Index: testFiles/GenericLogAdapter/config/APITests/Adapter/invalidConfiguration.adapter >=================================================================== >RCS file: testFiles/GenericLogAdapter/config/APITests/Adapter/invalidConfiguration.adapter >diff -N testFiles/GenericLogAdapter/config/APITests/Adapter/invalidConfiguration.adapter >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ testFiles/GenericLogAdapter/config/APITests/Adapter/invalidConfiguration.adapter 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,175 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!-- >+ Copyright (c) 2005,2007 IBM Corporation and others. >+ All rights reserved. This program and the accompanying materials >+ are made available under the terms of the Eclipse Public License v1.0 >+ which accompanies this distribution, and is available at >+ http://www.eclipse.org/legal/epl-v10.html >+ $Id: regex_example.adapter,v 1.9 2007/03/11 06:35:05 dnsmith Exp $ >+ >+ Contributors: >+ IBM - Initial API and implementation >+--> >+<adapter:Adapteqr 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="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" namae="Basic Context Implementation" role="context" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID1="N35B6D910F8511D88000A31D7605087A"> >+ <hga:Component description="Operating System file sensor" executableClass="org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSensor" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="OS File Sensor" role="sensor" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N3604F900F8511D88000A31D7605087A"/> >+ <hga:Component description="This extractor uses regular expression patterns to identify record delimiters" executableClass="org.eclipse.hyades.logging.adapter.extractors.RegularExpressionExtractor" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Regular Expression Extractor" role="messageExtractor" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36299800F8511D88000A31D7605087A"/> >+ <hga:Component description="Regular expression parser" executableClass="org.eclipse.hyades.logging.adapter.parsers.Parser" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Generic Parser" role="parser" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N3650A800F8511D88000Aaa31D7605087A"/> >+ <hga:Component description="CBE Formatter" executableClass="org.eclipse.hyades.logging.adapter.formatters.CBEFormatter" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="CBE Formatter" role="formatter" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36C36700F8511D88000A31D7605087A"/> >+ <hga:Component description="CBE File Outputter" executableClass="org.eclipse.hyades.logging.adapter.outputters.CBEFileOutputter" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" implementationVersionDescription="" loggingLevel="50" name="CBEFileOutputter" role="outputter" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36E80600F8511D88000A31D7605087A"/> >+ </hga:Context> >+ </hga:Contexts> >+ <cc:Configuration description="The component level configurations for this adapter" uniqueID="N35B6D900F8511D88000A31D7605087A"> >+ <cc:ContextInstance charset="" continuousOperation="false" description="Context Instance for the current component" isoCountryCode="US" isoLanguageCode="en" maximumIdleTime="20000" pauseInterval="10" uniqueID="N35B6D910F8511D88000A31D7605087A"> >+ <cc:Sensor description="A single file sensor" uniqueID="N3604F900F8511D88000A31D7605087A" confidenceBufferSize="512" fileFooterSize="0" maximumBlocking="10" type="SingleFileSensor"> >+ <pu:Property propertyName="directory" propertyValue="."/> >+ <pu:Property propertyName="fileName" propertyValue="example.log"/> >+ <sensor:SingleFileSensor directory="." fileName="example.log"/> >+ </cc:Sensor> >+ <ex:Extractor description="This extractor uses regular expression patterns to identify record delimiters" uniqueID="N36299800F8511D88000A31D7605087A" containsLineBreaks="true" endPattern="$" includeEndPattern="false" includeStartPattern="true" lineBreakSymbol="" replaceLineBreaks="false" startPattern="^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})|(\S+)"/> >+ <cc:Parser separatorToken="\s+" uniqueID="N3650A800F8511D88000A31D7605087A"> >+ <parser:RuleElement index="N3650A810F8511D88000A31D7605087A" name="CommonBaseEvent"> >+ <parser:RuleElement index="N8CA7C54002A11D88000C6FD28070181" name="sourceComponentId"> >+ <parser:RuleAttribute defaultValue="Apache HTTP Server" index="ND66C0C1002A11D88000C6FD28070181" name="component" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="Unknown" index="N77CD869002A11D88000C6FD28070181" name="subComponent" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="ProductName" index="N12069D2002A11D88000C6FD28070181" name="componentIdType" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute index="N3AB0CD6010F11D88000873B061CB0B3" name="location" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule substitute="" useBuiltInFunction="true"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute index="NCD2CCD7010F11D88000873B061CB0B3" name="locationType" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule substitute="" useBuiltInFunction="true"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="HTTPServer" index="NDE661030DAB11D88000930FA6625271" name="componentType" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N8273E56002C11D88000C6FD28070181" isChildChoice="true" name="situation"> >+ <parser:RuleElement index="NF8AFFE9002F11D88000C6FD28070181" name="RequestSituation"> >+ <parser:RuleAttribute index="N2815562002F11D88000C6FD28070181" isRequiredByParent="true" name="successDisposition" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(2\d{2}|3\d{2}|1\d{2})" positions="8" substitute="SUCCESSFUL"/> >+ <SubstitutionRule match="(2\d{2}|3\d{2}|1\d{2})" positions="9" substitute="SUCCESSFUL"/> >+ <SubstitutionRule match="(4\d{2}|5\d{2})" positions="8" substitute="UNSUCCESSFUL"/> >+ <SubstitutionRule match="(4\d{2}|5\d{2})" positions="9" substitute="UNSUCCESSFUL" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(\"\-\")@@(2\d{2}|3\d{2}|1\d{2})" positions="6@@7" substitute="SUCCESSFUL" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(\"\-\")@@(4\d{2}|5\d{2})" positions="6@@7" substitute="UNSUCCESSFUL" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="REQUEST COMPLETED" index="N30BA5C1002F11D88000C6FD28070181" name="situationQualifier" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="8" substitute="REQUEST INITIATED"/> >+ <SubstitutionRule match="(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="9" substitute="REQUEST INITIATED"/> >+ <SubstitutionRule match="(\"\-\")@@(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="6@@7" substitute="REQUEST INITIATED" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="EXTERNAL" index="NCCBFC40002F11D88000C6FD28070181" name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N224169A084711D8800091856AF4A65C" name="ReportSituation"> >+ <parser:RuleAttribute defaultValue="INTERNAL" index="N224169B084711D8800091856AF4A65C" name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="LOG" index="N224169C084711D8800091856AF4A65C" name="reportCategory" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ </parser:RuleElement> >+ <parser:RuleElement index="NF4E4C51002C11D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NEA78170002C11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0060000002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})" positions="1" substitute="$1"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="Client" index="N2CA0593002C11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="NE6BC644002C11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N9A75941002D11D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NE1B1FE0002D11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="NF0BE880002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(\d{3})" positions="8" substitute="$1"/> >+ <SubstitutionRule match="(\d{3})" positions="9" substitute="$1"/> >+ <SubstitutionRule match="\"\S+\"@@(\d{3})" positions="6@@7" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="return_code" index="NAE6B713002D11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="short" index="NA82DDF4002D11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N704BAD1002D11D88000C6FD28070181" isRequiredByParent="false" name="extendedDataElements"> >+ <parser:RuleElement index="NED77220002D11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0206CE0002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"\S+@@(.*)" positions="6@@7" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="string" index="N84689A4002D11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="File" index="NC265BE1002D11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N7F86201003311D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NB59C730003311D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="NC6013A0003311D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"(\w+)\"" positions="6" substitute="$1"/> >+ <SubstitutionRule match="\"(\w+)" positions="6" substitute="$1"/> >+ <SubstitutionRule match="\"(\S+)\"" positions="6" substitute="$1"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="string" index="NF34CCC4003311D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="method" index="N4B83CE3003311D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="ND054C63078911D880008B85FEE72030" name="extendedDataElements"> >+ <parser:RuleElement index="NE249F10078911D880008B85FEE72030" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0E370F0078911D880008B85FEE72030" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"(\S+)\"" positions="11" substitute="$1" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"(\S+)\"" positions="10" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="Referer" index="ND054C64078911D880008B85FEE72030" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="ND054C65078911D880008B85FEE72030" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N143DCE3078911D880008B85FEE72030" name="extendedDataElements"> >+ <parser:RuleElement index="N281B410078911D880008B85FEE72030" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N52E3670078911D880008B85FEE72030" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^.*\[.*\]\s\"\w+\s+.*\"\s+\S+\s+\S+\s+\"\S+\"\s+\"(.*)\"" positions="" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="User-agent" index="N143DCE4078911D880008B85FEE72030" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="N143DCE5078911D880008B85FEE72030" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="NA3A7573083F11D8800091856AF4A65C" name="extendedDataElements"> >+ <parser:RuleElement index="N1AF0730083F11D8800091856AF4A65C" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N2BEF090083F11D8800091856AF4A65C" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^([^0-9][^0-9\.][^0-9\.].*)" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="CGI Debugging Output" index="NA3A7574083F11D8800091856AF4A65C" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="NA3A7575083F11D8800091856AF4A65C" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="ND88BDA309FD11D88000B70A90A10773" name="extendedDataElements"> >+ <parser:RuleElement index="NFA8B77009FD11D88000B70A90A10773" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N18A21A009FE11D88000B70A90A10773" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="HTTP/.*\"@@(.+)" positions="8@@10" substitute="$1" useBuiltInFunction="false"/> >+ <SubstitutionRule match=".*\"@@(\d+)" positions="7@@9" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="file_size" index="ND88BDA409FD11D88000B70A90A10773" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="ND88BDA509FD11D88000B70A90A10773" name="type" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(HTTP/.*\")@@(.+)" positions="8@@10" substitute="string" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(.*\")@@(\d+)" positions="7@@9" substitute="int" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="0001-01-01T00:00:00.000000+00:00" index="N3650A820F8511D88000A31D7605087A" name="creationTime" usePreviousMatchSubstitutionAsDefault="true"> >+ <SubstitutionRule match="(.*)" positions="4@@5" substitute="$1" timeFormat="[dd/MMM/yyyy:HH:mm:ss@@z]" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute index="N024368D002B11D88000C6FD28070181" name="msg" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^[^"]+(\".*)" substitute="$1"/> >+ <SubstitutionRule match="^([^\d{1,3}][^\.][^\d{1,3}].*)" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="10" index="N230EBD1002C11D88000C6FD28070181" name="severity" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="5\d{2}" positions="8" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="5\d{2}" positions="9" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="4\d{2}" positions="8" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="4\d{2}" positions="9" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"\S+\"@@5\d{2}" positions="6@@7" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"\S+\"@@4\d{2}" positions="6@@7" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+5\d{2}\s+\d+.*" positions="" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+4\d{2}\s+\d+.*" positions="" substitute="40" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ </cc:Parser> >+ <fmt:Formatter description="CBE Formatter" uniqueID="N36C36700F8511D88000A31D7605087A"/> >+ <cc:Outputter description="Default Logging Agent" uniqueID="N36E80600F8511D88000A31D7605087A" type="SingleFileOutputter"> >+ <pu:Property propertyName="directory" propertyValue="."/> >+ <pu:Property propertyName="fileName" propertyValue="example.out"/> >+ <op:SingleFileOutputterType directory="." fileName="example.out"/> >+ </cc:Outputter> >+ </cc:ContextInstance> >+ </cc:Configuration> >+</adapter:Adapter> >Index: testFiles/GenericLogAdapter/config/APITests/Adapter/contextConfiguration.xml >=================================================================== >RCS file: testFiles/GenericLogAdapter/config/APITests/Adapter/contextConfiguration.xml >diff -N testFiles/GenericLogAdapter/config/APITests/Adapter/contextConfiguration.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ testFiles/GenericLogAdapter/config/APITests/Adapter/contextConfiguration.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,11 @@ >+<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="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Basic Context Implementation" role="context" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N35B6D910F8511D88000A31D7605087A"> >+ <hga:Component description="Operating System file sensor" executableClass="org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSensor" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="OS File Sensor" role="sensor" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N3604F900F8511D88000A31D7605087A"/> >+ <hga:Component description="This extractor uses regular expression patterns to identify record delimiters" executableClass="org.eclipse.hyades.logging.adapter.extractors.RegularExpressionExtractor" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Regular Expression Extractor" role="messageExtractor" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36299800F8511D88000A31D7605087A"/> >+ <hga:Component description="Regular expression parser" executableClass="org.eclipse.hyades.logging.adapter.parsers.Parser" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Generic Parser" role="parser" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N3650A800F8511D88000A31D7605087A"/> >+ <hga:Component description="CBE Formatter" executableClass="org.eclipse.hyades.logging.adapter.formatters.CBEFormatter" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="CBE Formatter" role="formatter" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36C36700F8511D88000A31D7605087A"/> >+ <hga:Component description="CBE File Outputter" executableClass="org.eclipse.hyades.logging.adapter.outputters.CBEFileOutputter" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" implementationVersionDescription="" loggingLevel="50" name="CBEFileOutputter" role="outputter" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36E80600F8511D88000A31D7605087A"/> >+ </hga:Context> >+ </hga:Contexts> >+</adapter:Adapter> >Index: testFiles/GenericLogAdapter/config/APITests/Adapter/example.log >=================================================================== >RCS file: testFiles/GenericLogAdapter/config/APITests/Adapter/example.log >diff -N testFiles/GenericLogAdapter/config/APITests/Adapter/example.log >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ testFiles/GenericLogAdapter/config/APITests/Adapter/example.log 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,186 @@ >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples HTTP/1.1" 301 315 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/ HTTP/1.1" 200 1576 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Master.css HTTP/1.1" 200 185 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Menu/Cube.html HTTP/1.1" 200 425 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Menu/Logo.html HTTP/1.1" 200 517 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Menu/Title.html HTTP/1.1" 200 421 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Menu/Menu.html HTTP/1.1" 200 3778 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Menu/Curve.html HTTP/1.1" 200 391 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/Menu/SamplesIntro.html HTTP/1.1" 200 30362 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/globecube.jpg HTTP/1.1" 200 4343 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/server.jpg HTTP/1.1" 200 24762 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/bluebackdark.jpg HTTP/1.1" 200 4450 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/ibm_logo_sm_fff.gif HTTP/1.1" 200 138 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/SamplesMaster.css HTTP/1.1" 200 1951 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/curve.jpg HTTP/1.1" 200 5579 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/stripes_repeat.jpg HTTP/1.1" 200 5798 >+9.26.157.44 - - [16/Jan/2003:21:22:59 -0500] "GET /WSsamples/images/clearPixel.gif HTTP/1.1" 200 43 >+9.26.157.44 - - [16/Jan/2003:21:23:06 -0500] "GET /WSsamples/Configuration/Database/DBConfig.html HTTP/1.1" 200 3811 >+9.26.157.44 - - [16/Jan/2003:21:23:06 -0500] "GET /WSsamples/images/takeNote.gif HTTP/1.1" 200 96 >+9.26.157.44 - - [16/Jan/2003:21:23:10 -0500] "GET /WebSphereSamples/YourCoDocs/YourCoIntro.html HTTP/1.1" 200 3203 >+9.26.157.44 - - [16/Jan/2003:21:23:10 -0500] "GET /theme/Master.css HTTP/1.1" 200 197 >+9.26.157.44 - - [16/Jan/2003:21:23:10 -0500] "GET /theme/SamplesMaster.css HTTP/1.1" 200 1963 >+9.26.157.44 - - [16/Jan/2003:21:23:10 -0500] "GET /theme/run.jpg HTTP/1.1" 200 6137 >+9.26.157.44 - - [16/Jan/2003:21:23:10 -0500] "GET /theme/technotes.jpg HTTP/1.1" 200 6241 >+9.26.157.44 - - [16/Jan/2003:21:23:10 -0500] "GET /WebSphereSamples/YourCoDocs/YourCoSample.jpg HTTP/1.1" 200 86317 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /WebSphereSamples/YourCo/index.jsp HTTP/1.1" 200 4684 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/YourCo.css HTTP/1.1" 200 92 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/topBanner.gif HTTP/1.1" 200 7427 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/bg.gif HTTP/1.1" 200 379 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/buttonDWN.gif HTTP/1.1" 200 555 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/button.gif HTTP/1.1" 200 1015 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/circleLine.gif HTTP/1.1" 200 213 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/horzLine.gif HTTP/1.1" 200 361 >+9.26.157.44 - - [16/Jan/2003:21:23:17 -0500] "GET /theme/photo01.jpg HTTP/1.1" 200 21960 >+9.26.157.44 - - [16/Jan/2003:21:23:19 -0500] "GET /WebSphereSamples/YourCo/WhitePages/frameset.html HTTP/1.1" 200 1098 >+9.26.157.44 - - [16/Jan/2003:21:23:19 -0500] "GET /WebSphereSamples/YourCo/WhitePages/blank.html HTTP/1.1" 200 780 >+9.26.157.44 - - [16/Jan/2003:21:23:20 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.SelectNames HTTP/1.1" 200 8121 >+9.26.157.44 - - [16/Jan/2003:21:23:24 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1110 >+9.26.157.44 - - [16/Jan/2003:21:23:28 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1108 >+9.26.157.44 - - [16/Jan/2003:21:23:32 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1101 >+9.26.157.44 - - [16/Jan/2003:21:24:34 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1108 >+9.26.157.44 - - [16/Jan/2003:21:24:38 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1110 >+9.26.157.44 - - [16/Jan/2003:21:24:41 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1109 >+9.26.157.44 - - [16/Jan/2003:21:24:43 -0500] "GET /WebSphereSamples/YourCo/WhitePages/directory.pdf HTTP/1.1" 200 134218 >+9.26.157.44 - - [16/Jan/2003:21:24:53 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByJob HTTP/1.1" 200 1210 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.News.NewsServlet HTTP/1.1" 200 4633 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/YourCo.css HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/bg.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/topBanner.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/buttonDWN.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/circleLine.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/photo01.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/button.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:24:57 -0500] "GET /theme/horzLine.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:25:00 -0500] "GET /WebSphereSamples/YourCo/index.jsp HTTP/1.1" 200 4684 >+9.26.157.44 - - [16/Jan/2003:21:25:01 -0500] "GET /WebSphereSamples/YourCo/main.html HTTP/1.1" 200 819 >+9.26.157.44 - - [16/Jan/2003:21:25:01 -0500] "GET /WebSphereSamples/YourCo/top.html HTTP/1.1" 200 2033 >+9.26.157.44 - - [16/Jan/2003:21:25:01 -0500] "GET /WebSphereSamples/YourCo/nav.jsp HTTP/1.1" 200 675 >+9.26.157.44 - - [16/Jan/2003:21:25:01 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.Customization.Center HTTP/1.1" 200 3448 >+9.26.157.44 - - [16/Jan/2003:21:25:05 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.News.NewsServlet HTTP/1.1" 200 4633 >+9.26.157.44 - - [16/Jan/2003:21:25:05 -0500] "GET /WebSphereSamples/YourCo/WhitePages/frameset.html HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:25:06 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.SelectNames HTTP/1.1" 200 8121 >+9.26.157.44 - - [16/Jan/2003:21:25:10 -0500] "GET /WebSphereSamples/YourCo/WhitePages/blank.html HTTP/1.1" 304 0 >+9.26.157.44 - - [16/Jan/2003:21:25:33 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.News.NewsServlet/TheExpiringHTMLServlet HTTP/1.1" 200 4633 >+9.131.0.90 - - [16/Jan/2003:22:49:00 -0500] "GET /scripts/root.exe?/c+dir HTTP/1.0" 404 279 >+9.131.0.90 - - [16/Jan/2003:22:49:01 -0500] "GET /MSADC/root.exe?/c+dir HTTP/1.0" 404 277 >+9.131.0.90 - - [16/Jan/2003:22:49:01 -0500] "GET /c/winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 287 >+9.131.0.90 - - [16/Jan/2003:22:49:02 -0500] "GET /d/winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 287 >+9.131.0.90 - - [16/Jan/2003:22:49:03 -0500] "GET /scripts/..%255c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 301 >+9.131.0.90 - - [16/Jan/2003:22:49:03 -0500] "GET /_vti_bin/..%255c../..%255c../..%255c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 318 >+9.131.0.90 - - [16/Jan/2003:22:49:04 -0500] "GET /_mem_bin/..%255c../..%255c../..%255c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 318 >+9.131.0.90 - - [16/Jan/2003:22:49:04 -0500] "GET /msadc/..%255c../..%255c../..%255c/..%c1%1c../..%c1%1c../..%c1%1c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 334 >+9.131.0.90 - - [16/Jan/2003:22:49:05 -0500] "GET /scripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 300 >+9.131.0.90 - - [16/Jan/2003:22:49:05 -0500] "GET /scripts/..%c0%2f../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 300 >+9.131.0.90 - - [16/Jan/2003:22:49:06 -0500] "GET /scripts/..%c0%af../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 300 >+9.131.0.90 - - [16/Jan/2003:22:49:07 -0500] "GET /scripts/..%c1%9c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 300 >+9.131.0.90 - - [16/Jan/2003:22:49:07 -0500] "GET /scripts/..%%35%63../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 400 284 >+9.131.0.90 - - [16/Jan/2003:22:49:08 -0500] "GET /scripts/..%%35c../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 400 284 >+9.131.0.90 - - [16/Jan/2003:22:49:08 -0500] "GET /scripts/..%25%35%63../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 301 >+9.131.0.90 - - [16/Jan/2003:22:49:09 -0500] "GET /scripts/..%252f../winnt/system32/cmd.exe?/c+dir HTTP/1.0" 404 301 >+9.26.157.44 - - [17/Jan/2003:11:09:45 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/BeanScripting/BeanScriptingIntro.html HTTP/1.1" 200 2411 >+9.26.157.44 - - [17/Jan/2003:11:09:45 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/BeanScripting/BeanScripting.gif HTTP/1.1" 200 26640 >+9.26.157.44 - - [17/Jan/2003:11:09:50 -0500] "GET /WebSphereSamples/SingleSamples/BeanScripting/BeanScripting_java.jsp HTTP/1.1" 200 1781 >+9.26.157.44 - - [17/Jan/2003:11:09:56 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/StockQuote/StockQuoteIntro.html HTTP/1.1" 200 2668 >+9.26.157.44 - - [17/Jan/2003:11:09:56 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/StockQuote/StockQuote.gif HTTP/1.1" 200 21575 >+9.26.157.44 - - [17/Jan/2003:11:09:59 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.StockQuote.StockQuoteServlet HTTP/1.1" 200 1814 >+9.26.157.44 - - [17/Jan/2003:11:10:10 -0500] "POST /WebSphereSamples/SingleSamples/StockQuoteServlet HTTP/1.1" 200 884 >+9.26.157.44 - - [17/Jan/2003:11:10:29 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/Xml/XMLIntro.html HTTP/1.1" 200 2684 >+9.26.157.44 - - [17/Jan/2003:11:10:29 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/Xml/XML.gif HTTP/1.1" 200 28055 >+9.26.103.101 - - [17/Jan/2003:11:10:33 -0500] "GET /WebSphereSamples/SingleSamples/XML/catalog.xml HTTP/1.1" 200 1112 >+9.26.103.101 - - [17/Jan/2003:11:10:33 -0500] "GET /WebSphereSamples/SingleSamples/XML/catalog.xml HTTP/1.1" 200 1112 >+9.26.103.101 - - [17/Jan/2003:11:10:34 -0500] "GET /WebSphereSamples/SingleSamples/XML/booklist1.xsl HTTP/1.1" 200 1161 >+9.26.157.44 - - [17/Jan/2003:11:10:36 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Xml.ApplyXSLT?URL=/WebSphereSamples/SingleSamples/XML/catalog.xml&xslURL=/WebSphereSamples/SingleSamples/XML/booklist1.xsl HTTP/1.1" 200 277 >+9.26.157.44 - - [17/Jan/2003:11:15:54 -0500] "GET /WebSphereSamples/YourCo/index.jsp HTTP/1.1" 200 4684 >+9.26.157.44 - - [17/Jan/2003:11:15:54 -0500] "GET /theme/YourCo.css HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:54 -0500] "GET /theme/bg.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:55 -0500] "GET /theme/topBanner.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:55 -0500] "GET /theme/buttonDWN.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:55 -0500] "GET /theme/button.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:55 -0500] "GET /theme/horzLine.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:55 -0500] "GET /theme/circleLine.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:55 -0500] "GET /theme/photo01.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:15:56 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.News.NewsServlet/TheExpiringHTMLServlet HTTP/1.1" 200 4715 >+9.26.157.44 - - [17/Jan/2003:11:15:57 -0500] "GET /WebSphereSamples/YourCo/index.jsp HTTP/1.1" 200 4684 >+9.26.157.44 - - [17/Jan/2003:11:16:08 -0500] "GET /WSsamples/TradeIntro/TradeSampleIntro.html HTTP/1.1" 200 2520 >+9.26.157.44 - - [17/Jan/2003:11:16:08 -0500] "GET /WSsamples/TradeIntro/TradeSample.gif HTTP/1.1" 200 12317 >+9.26.157.44 - - [17/Jan/2003:11:16:08 -0500] "GET /WSsamples/images/run.jpg HTTP/1.1" 200 6124 >+9.26.157.44 - - [17/Jan/2003:11:16:12 -0500] "GET /WSsamples/Configuration/Trade/Setup.html HTTP/1.1" 200 2526 >+9.26.157.44 - - [17/Jan/2003:11:16:13 -0500] "GET /WSsamples/images/clearPixel.gif HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:16:16 -0500] "GET /WSsamples/Configuration/Trade/DB2/task1.html HTTP/1.1" 200 4324 >+9.26.157.44 - - [17/Jan/2003:11:16:16 -0500] "GET /WSsamples/images/takeNote.gif HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:16:16 -0500] "GET /WSsamples/images/arrow.gif HTTP/1.1" 200 91 >+9.26.157.44 - - [17/Jan/2003:11:16:20 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/HelloEJB/HelloEJBIntro.html HTTP/1.1" 200 1612 >+9.26.157.44 - - [17/Jan/2003:11:16:20 -0500] "GET /theme/Master.css HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:16:20 -0500] "GET /theme/SamplesMaster.css HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:16:20 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/HelloEJB/HelloEJB.gif HTTP/1.1" 200 27794 >+9.26.157.44 - - [17/Jan/2003:11:16:20 -0500] "GET /theme/run.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:16:20 -0500] "GET /theme/technotes.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:16:24 -0500] "GET /WebSphereSamples/SingleSamples/HelloEJB/HelloEJB.jsp HTTP/1.1" 200 620 >+9.26.157.44 - - [17/Jan/2003:11:16:55 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/Increment/IncrementIntro.html HTTP/1.1" 200 1747 >+9.26.157.44 - - [17/Jan/2003:11:16:55 -0500] "GET /WebSphereSamples/SingleSamples/SamplesDocs/Increment/Increment.gif HTTP/1.1" 200 44263 >+9.26.157.44 - - [17/Jan/2003:11:17:00 -0500] "GET /WebSphereSamples/SingleSamples/Increment/increment.html HTTP/1.1" 200 1077 >+9.26.157.44 - - [17/Jan/2003:11:17:04 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:05 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:06 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:07 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:08 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:08 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:09 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:10 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:11 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit+Again HTTP/1.1" 200 559 >+9.26.157.44 - - [17/Jan/2003:11:17:13 -0500] "GET /WebSphereSamples/SingleSamples/servlet/WebSphereSamples.Increment.VisitIncrementSite?submit=Visit HTTP/1.1" 200 560 >+9.26.157.44 - - [17/Jan/2003:11:17:17 -0500] "GET /WebSphereSamples/YourCoDocs/YourCoIntro.html HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:17 -0500] "GET /WebSphereSamples/YourCoDocs/YourCoSample.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /WebSphereSamples/YourCo/index.jsp HTTP/1.1" 200 4684 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/YourCo.css HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/topBanner.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/buttonDWN.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/bg.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/circleLine.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/photo01.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/button.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:21 -0500] "GET /theme/horzLine.gif HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:23 -0500] "GET /WebSphereSamples/YourCo/WhitePages/frameset.html HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:23 -0500] "GET /WebSphereSamples/YourCo/WhitePages/blank.html HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:17:23 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.SelectNames HTTP/1.1" 200 8121 >+9.26.157.44 - - [17/Jan/2003:11:17:27 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1108 >+9.26.157.44 - - [17/Jan/2003:11:32:18 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 500 605 >+9.26.157.44 - - [17/Jan/2003:11:32:27 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 500 605 >+9.26.157.44 - - [17/Jan/2003:11:32:42 -0500] "GET /WSsamples/en/index.html HTTP/1.1" 404 298 >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples HTTP/1.1" 301 315 >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/ HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Master.css HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Menu/Cube.html HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Menu/Logo.html HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Menu/Title.html HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Menu/Menu.html HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Menu/Curve.html HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/Menu/SamplesIntro.html HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/images/globecube.jpg HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/images/bluebackdark.jpg HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/images/ibm_logo_sm_fff.gif HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/images/server.jpg HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/SamplesMaster.css HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/images/curve.jpg HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:45 -0500] "GET /WSsamples/images/clearPixel.gif HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:32:46 -0500] "GET /WSsamples/images/stripes_repeat.jpg HTTP/1.1" 304 - >+9.26.157.44 - - [17/Jan/2003:11:36:35 -0500] "GET /WebSphereSamples/YourCoDocs/YourCoIntro.html HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:36:35 -0500] "GET /theme/Master.css HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:36:35 -0500] "GET /theme/SamplesMaster.css HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:36:36 -0500] "GET /theme/run.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:36:36 -0500] "GET /WebSphereSamples/YourCoDocs/YourCoSample.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:36:36 -0500] "GET /theme/technotes.jpg HTTP/1.1" 304 0 >+9.26.157.44 - - [17/Jan/2003:11:36:40 -0500] "GET /WebSphereSamples/YourCo/index.jsp HTTP/1.1" 200 4684 >+9.26.157.44 - - [17/Jan/2003:11:36:45 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.News.NewsServlet HTTP/1.1" 200 4771 >+9.26.157.44 - - [17/Jan/2003:11:36:51 -0500] "GET /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.SelectNames HTTP/1.1" 200 8121 >+9.26.157.44 - - [17/Jan/2003:11:36:53 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1110 >+9.26.157.44 - - [17/Jan/2003:11:36:58 -0500] "POST /WebSphereSamples/servlet/WebSphereSamples.YourCo.WhitePages.ByName HTTP/1.1" 200 1108 >+9.26.64.68 - - [17/Jan/2003:11:36:58 -0500] "GET /cgi-bin/htsearch?Exclude="%60/etc/passwd%60" HTTP/1.0" 404 210 "-" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:36:58 -0500] "GET /cgi-bin/webdist.cgi?distloc=";cat%20/etc/passwd" HTTP/1.0" 404 213 "-" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:37:01 -0500] "GET /scripts/nc.exe?/c"-h" HTTP/1.0" 404 208 "-" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:37:11 -0500] "GET /ibmlink?request="><script>alert(document.domain)</script> HTTP/1.0" 404 201 "-" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:51:52 -0500] "GET /cgi-bin/bizdb1-search.cgi?template=bizdb-summary&dbname=id;cat /etc/passwd|&f6=^a.*&action=searchdbdisplay HTTP/1.0" 404 219 "http://host.blah.com/cgi-bin/bizdb1-search.cgi?bizdb-search" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:52:10 -0500] "GET /level/16/exec/show 0onf HTTP/1.0" 404 212 "-" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:52:10 -0500] "GET /level/17/exec/show onf HTTP/1.0" 404 212 "-" "Network-Services-Auditor/1.3.1" >+9.26.64.68 - - [17/Jan/2003:11:55:43 -0500] "GET /level/63/exec/show onf HTTP/1.0" 404 212 "-" "Network-Services-Auditor/1.3.1" >Index: testFiles/GenericLogAdapter/config/APITests/Adapter/Valid.adapter >=================================================================== >RCS file: testFiles/GenericLogAdapter/config/APITests/Adapter/Valid.adapter >diff -N testFiles/GenericLogAdapter/config/APITests/Adapter/Valid.adapter >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ testFiles/GenericLogAdapter/config/APITests/Adapter/Valid.adapter 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,175 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!-- >+ Copyright (c) 2005,2007 IBM Corporation and others. >+ All rights reserved. This program and the accompanying materials >+ are made available under the terms of the Eclipse Public License v1.0 >+ which accompanies this distribution, and is available at >+ http://www.eclipse.org/legal/epl-v10.html >+ $Id: regex_example.adapter,v 1.9 2007/03/11 06:35:05 dnsmith Exp $ >+ >+ Contributors: >+ IBM - Initial API and implementation >+--> >+<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="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Basic Context Implementation" role="context" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N35B6D910F8511D88000A31D7605087A"> >+ <hga:Component description="Operating System file sensor" executableClass="org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSensor" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="OS File Sensor" role="sensor" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N3604F900F8511D88000A31D7605087A"/> >+ <hga:Component description="This extractor uses regular expression patterns to identify record delimiters" executableClass="org.eclipse.hyades.logging.adapter.extractors.RegularExpressionExtractor" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Regular Expression Extractor" role="messageExtractor" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36299800F8511D88000A31D7605087A"/> >+ <hga:Component description="Regular expression parser" executableClass="org.eclipse.hyades.logging.adapter.parsers.Parser" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="Generic Parser" role="parser" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N3650A800F8511D88000A31D7605087A"/> >+ <hga:Component description="CBE Formatter" executableClass="org.eclipse.hyades.logging.adapter.formatters.CBEFormatter" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" loggingLevel="50" name="CBE Formatter" role="formatter" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36C36700F8511D88000A31D7605087A"/> >+ <hga:Component description="CBE File Outputter" executableClass="org.eclipse.hyades.logging.adapter.outputters.CBEFileOutputter" implementationCreationDate="2003-10-07T12:00:00" implementationVersion="1.0.0" implementationVersionDescription="" loggingLevel="50" name="CBEFileOutputter" role="outputter" roleCreationDate="2003-10-07T12:00:00" roleVersion="1.0.0" uniqueID="N36E80600F8511D88000A31D7605087A"/> >+ </hga:Context> >+ </hga:Contexts> >+ <cc:Configuration description="The component level configurations for this adapter" uniqueID="N35B6D900F8511D88000A31D7605087A"> >+ <cc:ContextInstance charset="" continuousOperation="true" description="Context Instance for the current component" isoCountryCode="US" isoLanguageCode="en" maximumIdleTime="50000" pauseInterval="10" uniqueID="N35B6D910F8511D88000A31D7605087A"> >+ <cc:Sensor description="A single file sensor" uniqueID="N3604F900F8511D88000A31D7605087A" confidenceBufferSize="512" fileFooterSize="0" maximumBlocking="10" type="SingleFileSensor"> >+ <pu:Property propertyName="directory" propertyValue="."/> >+ <pu:Property propertyName="fileName" propertyValue="example.log"/> >+ <sensor:SingleFileSensor directory="." fileName="example.log"/> >+ </cc:Sensor> >+ <ex:Extractor description="This extractor uses regular expression patterns to identify record delimiters" uniqueID="N36299800F8511D88000A31D7605087A" containsLineBreaks="true" endPattern="$" includeEndPattern="false" includeStartPattern="true" lineBreakSymbol="" replaceLineBreaks="false" startPattern="^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})|(\S+)"/> >+ <cc:Parser separatorToken="\s+" uniqueID="N3650A800F8511D88000A31D7605087A"> >+ <parser:RuleElement index="N3650A810F8511D88000A31D7605087A" name="CommonBaseEvent"> >+ <parser:RuleElement index="N8CA7C54002A11D88000C6FD28070181" name="sourceComponentId"> >+ <parser:RuleAttribute defaultValue="Apache HTTP Server" index="ND66C0C1002A11D88000C6FD28070181" name="component" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="Unknown" index="N77CD869002A11D88000C6FD28070181" name="subComponent" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="ProductName" index="N12069D2002A11D88000C6FD28070181" name="componentIdType" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute index="N3AB0CD6010F11D88000873B061CB0B3" name="location" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule substitute="" useBuiltInFunction="true"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute index="NCD2CCD7010F11D88000873B061CB0B3" name="locationType" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule substitute="" useBuiltInFunction="true"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="HTTPServer" index="NDE661030DAB11D88000930FA6625271" name="componentType" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N8273E56002C11D88000C6FD28070181" isChildChoice="true" name="situation"> >+ <parser:RuleElement index="NF8AFFE9002F11D88000C6FD28070181" name="RequestSituation"> >+ <parser:RuleAttribute index="N2815562002F11D88000C6FD28070181" isRequiredByParent="true" name="successDisposition" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(2\d{2}|3\d{2}|1\d{2})" positions="8" substitute="SUCCESSFUL"/> >+ <SubstitutionRule match="(2\d{2}|3\d{2}|1\d{2})" positions="9" substitute="SUCCESSFUL"/> >+ <SubstitutionRule match="(4\d{2}|5\d{2})" positions="8" substitute="UNSUCCESSFUL"/> >+ <SubstitutionRule match="(4\d{2}|5\d{2})" positions="9" substitute="UNSUCCESSFUL" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(\"\-\")@@(2\d{2}|3\d{2}|1\d{2})" positions="6@@7" substitute="SUCCESSFUL" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(\"\-\")@@(4\d{2}|5\d{2})" positions="6@@7" substitute="UNSUCCESSFUL" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="REQUEST COMPLETED" index="N30BA5C1002F11D88000C6FD28070181" name="situationQualifier" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="8" substitute="REQUEST INITIATED"/> >+ <SubstitutionRule match="(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="9" substitute="REQUEST INITIATED"/> >+ <SubstitutionRule match="(\"\-\")@@(202|3\d{2}|1\d{2}|4\d{2}|5\d{2})" positions="6@@7" substitute="REQUEST INITIATED" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="EXTERNAL" index="NCCBFC40002F11D88000C6FD28070181" name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N224169A084711D8800091856AF4A65C" name="ReportSituation"> >+ <parser:RuleAttribute defaultValue="INTERNAL" index="N224169B084711D8800091856AF4A65C" name="reasoningScope" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="LOG" index="N224169C084711D8800091856AF4A65C" name="reportCategory" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ </parser:RuleElement> >+ <parser:RuleElement index="NF4E4C51002C11D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NEA78170002C11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0060000002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})" positions="1" substitute="$1"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="Client" index="N2CA0593002C11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="NE6BC644002C11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N9A75941002D11D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NE1B1FE0002D11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="NF0BE880002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(\d{3})" positions="8" substitute="$1"/> >+ <SubstitutionRule match="(\d{3})" positions="9" substitute="$1"/> >+ <SubstitutionRule match="\"\S+\"@@(\d{3})" positions="6@@7" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="return_code" index="NAE6B713002D11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="short" index="NA82DDF4002D11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N704BAD1002D11D88000C6FD28070181" isRequiredByParent="false" name="extendedDataElements"> >+ <parser:RuleElement index="NED77220002D11D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0206CE0002D11D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"\S+@@(.*)" positions="6@@7" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="string" index="N84689A4002D11D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="File" index="NC265BE1002D11D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N7F86201003311D88000C6FD28070181" name="extendedDataElements"> >+ <parser:RuleElement index="NB59C730003311D88000C6FD28070181" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="NC6013A0003311D88000C6FD28070181" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"(\w+)\"" positions="6" substitute="$1"/> >+ <SubstitutionRule match="\"(\w+)" positions="6" substitute="$1"/> >+ <SubstitutionRule match="\"(\S+)\"" positions="6" substitute="$1"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="string" index="NF34CCC4003311D88000C6FD28070181" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="method" index="N4B83CE3003311D88000C6FD28070181" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="ND054C63078911D880008B85FEE72030" name="extendedDataElements"> >+ <parser:RuleElement index="NE249F10078911D880008B85FEE72030" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N0E370F0078911D880008B85FEE72030" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="\"(\S+)\"" positions="11" substitute="$1" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"(\S+)\"" positions="10" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="Referer" index="ND054C64078911D880008B85FEE72030" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="ND054C65078911D880008B85FEE72030" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="N143DCE3078911D880008B85FEE72030" name="extendedDataElements"> >+ <parser:RuleElement index="N281B410078911D880008B85FEE72030" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N52E3670078911D880008B85FEE72030" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^.*\[.*\]\s\"\w+\s+.*\"\s+\S+\s+\S+\s+\"\S+\"\s+\"(.*)\"" positions="" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="User-agent" index="N143DCE4078911D880008B85FEE72030" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="N143DCE5078911D880008B85FEE72030" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="NA3A7573083F11D8800091856AF4A65C" name="extendedDataElements"> >+ <parser:RuleElement index="N1AF0730083F11D8800091856AF4A65C" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N2BEF090083F11D8800091856AF4A65C" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^([^0-9][^0-9\.][^0-9\.].*)" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="CGI Debugging Output" index="NA3A7574083F11D8800091856AF4A65C" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="NA3A7575083F11D8800091856AF4A65C" name="type" usePreviousMatchSubstitutionAsDefault="false"/> >+ </parser:RuleElement> >+ <parser:RuleElement index="ND88BDA309FD11D88000B70A90A10773" name="extendedDataElements"> >+ <parser:RuleElement index="NFA8B77009FD11D88000B70A90A10773" isRequiredByParent="true" name="values"> >+ <parser:RuleAttribute index="N18A21A009FE11D88000B70A90A10773" name="values" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="HTTP/.*\"@@(.+)" positions="8@@10" substitute="$1" useBuiltInFunction="false"/> >+ <SubstitutionRule match=".*\"@@(\d+)" positions="7@@9" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="file_size" index="ND88BDA409FD11D88000B70A90A10773" name="name" usePreviousMatchSubstitutionAsDefault="false"/> >+ <parser:RuleAttribute defaultValue="string" index="ND88BDA509FD11D88000B70A90A10773" name="type" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="(HTTP/.*\")@@(.+)" positions="8@@10" substitute="string" useBuiltInFunction="false"/> >+ <SubstitutionRule match="(.*\")@@(\d+)" positions="7@@9" substitute="int" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ <parser:RuleAttribute defaultValue="0001-01-01T00:00:00.000000+00:00" index="N3650A820F8511D88000A31D7605087A" name="creationTime" usePreviousMatchSubstitutionAsDefault="true"> >+ <SubstitutionRule match="(.*)" positions="4@@5" substitute="$1" timeFormat="[dd/MMM/yyyy:HH:mm:ss@@z]" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute index="N024368D002B11D88000C6FD28070181" name="msg" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="^[^"]+(\".*)" substitute="$1"/> >+ <SubstitutionRule match="^([^\d{1,3}][^\.][^\d{1,3}].*)" substitute="$1" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ <parser:RuleAttribute defaultValue="10" index="N230EBD1002C11D88000C6FD28070181" name="severity" usePreviousMatchSubstitutionAsDefault="false"> >+ <SubstitutionRule match="5\d{2}" positions="8" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="5\d{2}" positions="9" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="4\d{2}" positions="8" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="4\d{2}" positions="9" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"\S+\"@@5\d{2}" positions="6@@7" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="\"\S+\"@@4\d{2}" positions="6@@7" substitute="40" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+5\d{2}\s+\d+.*" positions="" substitute="60" useBuiltInFunction="false"/> >+ <SubstitutionRule match="[^\"]+\"[\S\s\"]+\"\s+4\d{2}\s+\d+.*" positions="" substitute="40" useBuiltInFunction="false"/> >+ </parser:RuleAttribute> >+ </parser:RuleElement> >+ </cc:Parser> >+ <fmt:Formatter description="CBE Formatter" uniqueID="N36C36700F8511D88000A31D7605087A"/> >+ <cc:Outputter description="Default Logging Agent" uniqueID="N36E80600F8511D88000A31D7605087A" type="SingleFileOutputter"> >+ <pu:Property propertyName="directory" propertyValue="."/> >+ <pu:Property propertyName="fileName" propertyValue="example.out"/> >+ <op:SingleFileOutputterType directory="." fileName="example.out"/> >+ </cc:Outputter> >+ </cc:ContextInstance> >+ </cc:Configuration> >+</adapter:Adapter> >Index: src/org/eclipse/hyades/logging/adapter/tests/utils/APITestJUtils.java >=================================================================== >RCS file: src/org/eclipse/hyades/logging/adapter/tests/utils/APITestJUtils.java >diff -N src/org/eclipse/hyades/logging/adapter/tests/utils/APITestJUtils.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/hyades/logging/adapter/tests/utils/APITestJUtils.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,689 @@ >+package org.eclipse.hyades.logging.adapter.tests.utils; >+/********************************************************************** >+ * Copyright (c) 2006, 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * $Id: TestJUtils.java,v 1.6 2007/03/27 22:31:36 dnsmith Exp $ >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ **********************************************************************/ >+ >+import java.io.File; >+ >+import org.eclipse.hyades.logging.adapter.Adapter; >+import org.eclipse.hyades.logging.adapter.AdapterException; >+import org.eclipse.hyades.logging.adapter.IComponent; >+import org.eclipse.hyades.logging.adapter.IContext; >+import org.eclipse.hyades.logging.adapter.IStatus; >+import org.eclipse.hyades.logging.adapter.outputters.CBEFileOutputter; >+import org.eclipse.hyades.logging.adapter.sensors.SingleOSFileSensor; >+ >+import org.eclipse.hyades.test.common.junit.HyadesTestCase; >+import org.eclipse.tptp.monitoring.auto.tests.utils.PropertiesWrapper; >+ >+/** >+ * This is the main class to run GLA API tests and check the results >+ * >+ */ >+ >+public class APITestJUtils extends HyadesTestCase >+{ >+ public APITestJUtils(String arg0) >+ { >+ super(arg0); >+ } >+ >+ private static String getActualFile(String relativeFile) >+ { >+ return PropertiesWrapper.DEPLOYMENT_HOME + "/" + relativeFile; >+ } >+ >+ >+ >+ public static void testInvalidSetContextConfigPathAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath("c:\\dummy.adapter"); //does not exist >+ adapter.setComponentConfigPath(adapterConfigFile); >+ /* Get the adapter configuration */ >+ >+ try { >+ adapter.getConfiguration(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ fail("AdapterException was not thrown due to invalid path"); >+ } >+ >+ public static void testInvalidAdapterSetContextConfigPathAPI(String invalidAdapterFile,String adapterConfigFile) >+ { >+ invalidAdapterFile = getActualFile(invalidAdapterFile); >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(invalidAdapterFile); //invalid content >+ adapter.setComponentConfigPath(adapterConfigFile); >+ /* Get the adapter configuration */ >+ >+ try { >+ adapter.getConfiguration(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ fail("AdapterException was not thrown due to invalid adapter content"); >+ } >+ >+ public static void testInvalidSetComponentConfigPathAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); //does not exist >+ adapter.setComponentConfigPath("c:\\dummy.adapter"); >+ /* Get the adapter configuration */ >+ >+ try { >+ adapter.getConfiguration(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ fail("AdapterException was not thrown due to invalid path"); >+ } >+ >+ public static void testInvalidAdapterSetComponentConfigPathAPI(String invalidAdapterFile,String adapterConfigFile) >+ { >+ invalidAdapterFile = getActualFile(invalidAdapterFile); >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); //does not exist >+ adapter.setComponentConfigPath(invalidAdapterFile); >+ /* Get the adapter configuration */ >+ >+ try { >+ adapter.getConfiguration(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ fail("AdapterException was not thrown due to invalid adapter content"); >+ } >+ >+ public static void testValidDiffFileSetContextComponentConfigPathAPI(String contextConfigFile,String componentConfigFile) >+ { >+ contextConfigFile = getActualFile(contextConfigFile); >+ componentConfigFile = getActualFile(componentConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(contextConfigFile); >+ adapter.setComponentConfigPath(componentConfigFile); >+ /* Get the adapter configuration */ >+ IContext [] contexts = null; >+ >+ try { >+ contexts = adapter.getConfiguration(); >+ assertNotNull(contexts); >+ } >+ catch (AdapterException e) { >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ } >+ >+ public static void testSetLoggingLevelAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ adapter.setLoggingLevel((short)0); >+ /* Get the adapter configuration */ >+ IContext [] contexts = null; >+ >+ try >+ { >+ contexts = adapter.getConfiguration(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)contexts[0].getComponents()[0]; >+ >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ assertNotSame(adapter.getLoggingLevel(), contexts[0].getLoggingLevel()); >+ adapter.start(true, true); >+ assertNotNull(contexts); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ adapter.stop(); >+ assertEquals(adapter.getLoggingLevel(), contexts[0].getLoggingLevel()); >+ } >+ >+ public static void testGetLoggingLevelAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ adapter.setLoggingLevel((short)10); >+ assertEquals(adapter.getLoggingLevel(), 10); >+ } >+ >+ public static void testGetLoggingLevelAPIDefaultValue(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ assertEquals(adapter.getLoggingLevel(), -1); >+ } >+ >+ public static void testValidGetConfigurationAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); //does not exist >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ try >+ { >+ IContext [] contexts = adapter.getConfiguration(); >+ assertNotNull(contexts); >+ } >+ catch (AdapterException e) { >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ } >+ >+ public static void testInvalidGetConfigurationAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ try >+ { >+ adapter.getConfiguration(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ fail("Invalid configuration did not throw any errors"); >+ } >+ >+ public static void testInvalidNoPathGetConfigurationAPI() >+ { >+ Adapter adapter = new Adapter(); >+ try >+ { >+ adapter.getConfiguration(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ fail("Invalid configuration did not throw any errors"); >+ } >+ >+ >+ >+ public static void testSuccessValidateAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ adapter.setLoggingLevel((short)0); >+ /* Get the adapter configuration */ >+ IContext [] contexts = null; >+ >+ try >+ { >+ contexts = adapter.getConfiguration(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)contexts[0].getComponents()[0]; >+ >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ adapter.validate(); >+ } >+ catch (AdapterException e) { >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ } >+ >+ >+ public static void testFailedNoPathValidateAPI() >+ { >+ Adapter adapter = new Adapter(); >+ try >+ { >+ adapter.validate(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail(e.getMessage()); >+ } >+ fail("Invalid configuration in the adapter did not throw any exception during validate()"); >+ } >+ >+ public static void testFailedValidateAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ /* Get the adapter configuration */ >+ try >+ { >+ adapter.validate(); >+ } >+ catch (AdapterException e) { >+ return; >+ } >+ catch(Throwable e) >+ { >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ fail("Invalid configuration in the adapter did not throw any exception during validate()"); >+ } >+ >+ >+ public static void testStartThreadDeamonModeAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ try >+ { >+ IContext [] contexts = adapter.getConfiguration(); >+ IComponent[] components = contexts[0].getComponents(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)components[0]; >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ >+ /* Get the outputter and update the directory and file name of the output file */ >+ CBEFileOutputter outputter = (CBEFileOutputter)components[components.length-1]; >+ outputter.setFileName("startTest1.out"); >+ outputter.setDirectory(new File(adapterConfigFile).getParent()); >+ >+ adapter.start(true, true); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ adapter.stop(); >+ assertTrue("Out file was not generated", (new File(new File(adapterConfigFile).getParent() + "/startTest1.out")).exists()); >+ } >+ >+ >+ >+ public static void testStartNonThreadModeAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ adapter.setLoggingLevel((short)0); >+ >+ try >+ { >+ IContext [] contexts = adapter.getConfiguration(); >+ IComponent[] components = contexts[0].getComponents(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)components[0]; >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ >+ /* Get the outputter and update the directory and file name of the output file */ >+ CBEFileOutputter outputter = (CBEFileOutputter)components[components.length-1]; >+ outputter.setFileName("startTest2.out"); >+ outputter.setDirectory(new File(adapterConfigFile).getParent()); >+ >+ adapter.start(false, false); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ adapter.stop(); >+ assertTrue("Out file was not generated", (new File(new File(adapterConfigFile).getParent() + "/startTest2.out")).exists()); >+ } >+ >+ public static void testStartInvalidAdapterModeAPI() >+ { >+ Adapter adapter = new Adapter(); >+ try >+ { >+ adapter.start(true, true); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ return; >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ adapter.stop(); >+ fail("Exception not thrown for invalid adapter"); >+ } >+ >+ public static void testSetLogOutputterAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ adapter.setLoggingLevel((short)0); >+ >+ try >+ { >+ /* Create a file outputter to capture GLA >+ * log messages. >+ */ >+ CBEFileOutputter fo = new CBEFileOutputter(); >+ fo.setDirectory(new File(adapterConfigFile).getParent()); >+ fo.setFileName("testgla1.log"); >+ >+ /* Set the outputter to capture the GLA log messages */ >+ adapter.setLogOutputter(fo); >+ >+ IContext [] contexts = adapter.getConfiguration(); >+ IComponent[] components = contexts[0].getComponents(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)components[0]; >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ >+ /* Get the outputter and update the directory and file name of the output file */ >+ CBEFileOutputter outputter = (CBEFileOutputter)components[components.length-1]; >+ outputter.setFileName("sample.out"); >+ outputter.setDirectory(new File(adapterConfigFile).getParent()); >+ >+ adapter.start(false, false); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ adapter.stop(); >+ File result = (new File(new File(adapterConfigFile).getParent() + "/testgla1.log")); >+ assertTrue("Out file " + result.getAbsolutePath()+ "was not generated", (result.exists() && result.length() > 0)); >+ } >+ >+ public static void testStopAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ try >+ { >+ IContext [] contexts = adapter.getConfiguration(); >+ IComponent[] components = contexts[0].getComponents(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)components[0]; >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ >+ /* Get the outputter and update the directory and file name of the output file */ >+ CBEFileOutputter outputter = (CBEFileOutputter)components[components.length-1]; >+ outputter.setFileName("apacheaccess.out"); >+ outputter.setDirectory(new File(adapterConfigFile).getParent()); >+ >+ adapter.start(true, true); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ adapter.stop(); >+ >+ /* Get the adapter status */ >+ IStatus status = adapter.getStatus(); >+ >+ if (status != null) { >+ assertFalse("Adapter has not stopped",status.isActive()); >+ } >+ } >+ >+ >+ public static void testHardStopAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ try >+ { >+ IContext [] contexts = adapter.getConfiguration(); >+ IComponent[] components = contexts[0].getComponents(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)components[0]; >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ >+ /* Get the outputter and update the directory and file name of the output file */ >+ CBEFileOutputter outputter = (CBEFileOutputter)components[components.length-1]; >+ outputter.setFileName("apacheaccess.out"); >+ outputter.setDirectory(new File(adapterConfigFile).getParent()); >+ >+ adapter.start(true, true); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ adapter.hardStop(); >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ /* Get the adapter status */ >+ IStatus status = adapter.getStatus(); >+ >+ if (status != null) { >+ assertFalse("Adapter has not stopped",status.isActive()); >+ } >+ } >+ >+ >+ public static void testGetStatusAPI(String adapterConfigFile) >+ { >+ adapterConfigFile = getActualFile(adapterConfigFile); >+ Adapter adapter = new Adapter(); >+ adapter.setContextConfigPath(adapterConfigFile); >+ adapter.setComponentConfigPath(adapterConfigFile); >+ >+ try >+ { >+ IContext [] contexts = adapter.getConfiguration(); >+ IComponent[] components = contexts[0].getComponents(); >+ /* Get the sensor and update the directory and file name of the log to parse */ >+ SingleOSFileSensor sensor = (SingleOSFileSensor)components[0]; >+ sensor.setDirectory(new File(adapterConfigFile).getParent()); >+ sensor.setFileName("example.log"); >+ >+ /* Get the outputter and update the directory and file name of the output file */ >+ CBEFileOutputter outputter = (CBEFileOutputter)components[components.length-1]; >+ outputter.setFileName("apacheaccess.out"); >+ outputter.setDirectory(new File(adapterConfigFile).getParent()); >+ >+ adapter.start(true, true); >+ } >+ catch (AdapterException e) { >+ adapter.stop(); >+ fail(e.getMessage()); >+ } >+ catch(Throwable e) >+ { >+ adapter.stop(); >+ // Fail since we are supposed to get an AdapterException >+ fail("Expected AdapterException - Error: " + e); >+ } >+ >+ try { >+ Thread.sleep(3000); >+ } >+ catch (InterruptedException e) {} >+ >+ >+ /* Get the adapter status */ >+ IStatus status = adapter.getStatus(); >+ if (status != null) { >+ long time = status.getElapsedTimeInMilliseconds(); >+ int processed = status.getItemsProcessedCount(); >+ adapter.stop(); >+ assertTrue("Adapter has invalid status",(time > 0 && processed > 0)); >+ } >+ else >+ { >+ adapter.stop(); >+ fail("Status object is null"); >+ } >+ } >+ >+ public static void main(String[] arg) >+ { >+ testStopAPI("D:\\TPTP_4_4\\build_tptp\\GenericLogAdapter\\config\\Apache\\access\\v1.3.26\\regex_example.adapter"); >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 170870
:
65178
| 65179 |
65182