Bug 77318 - Provide static/rules log file parser to import Java Logging XML log files.
Summary: Provide static/rules log file parser to import Java Logging XML log files.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP.monitoring (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dave Smith CLA
QA Contact:
URL: http://www.eclipse.org/tptp/groups/Ar...
Whiteboard:
Keywords: PII, plan
Depends on:
Blocks:
 
Reported: 2004-10-29 13:29 EDT by Paul Slauenwhite CLA
Modified: 2010-06-03 15:10 EDT (History)
2 users (show)

See Also:


Attachments
Sample adapter file. (12.45 KB, text/xml)
2005-02-23 12:22 EST, Paul Slauenwhite CLA
no flags Details
Sample log file #1. (13.30 KB, text/xml)
2005-11-14 08:09 EST, Paul Slauenwhite CLA
no flags Details
Sample log file #2. (108.74 KB, text/xml)
2005-11-14 08:10 EST, Paul Slauenwhite CLA
no flags Details
Sample adapter file #1. (12.29 KB, text/xml)
2005-11-14 08:12 EST, Paul Slauenwhite CLA
no flags Details
Sample adapter file #2. (12.73 KB, text/xml)
2005-11-14 08:12 EST, Paul Slauenwhite CLA
no flags Details
Patch (330.59 KB, patch)
2005-12-06 12:39 EST, Rohit Shetty CLA
no flags Details | Diff
Patch (622.27 KB, patch)
2005-12-07 01:17 EST, Rohit Shetty CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2004-10-29 13:29:59 EDT
Provide static/rules log file parser to import Java Logging XML log files.

The Java Logging implementation of JSR-047 provide a formatter to convert 
LogRecords to XML.  Since Hyades provides support for Java Logging (see 
org.eclipse.hyades.logging.java14), we should provide a static/rules log file 
parser to map Log Record XML fragments to Common Base Events using the mapping 
in the org.eclipse.hyades.logging.java14.XmlFormatter.  Below is the DTD for 
the JSR-047 formatter: 


<!-- DTD used by the java.util.logging.XMLFormatter -->
<!-- This provides an XML formatted log message. -->

<!-- The document type is "log" which consists of a sequence
of record elements -->
<!ELEMENT log (record*)>

<!-- Each logging call is described by a record element. -->
<!ELEMENT record (date, millis, sequence, logger?, level,
class?, method?, thread?, message, key?, catalog?, param*, exception?)>

<!-- Date and time when LogRecord was created in ISO 8601 format -->
<!ELEMENT date (#PCDATA)>

<!-- Time when LogRecord was created in milliseconds since
midnight January 1st, 1970, UTC. -->
<!ELEMENT millis (#PCDATA)>

<!-- Unique sequence number within source VM. -->
<!ELEMENT sequence (#PCDATA)>

<!-- Name of source Logger object. -->
<!ELEMENT logger (#PCDATA)>

<!-- Logging level, may be either one of the constant
names from java.util.logging.Constants (such as "SEVERE"
or "WARNING") or an integer value such as "20". -->
<!ELEMENT level (#PCDATA)>

<!-- Fully qualified name of class that issued
logging call, e.g. "javax.marsupial.Wombat". -->
<!ELEMENT class (#PCDATA)>

<!-- Name of method that issued logging call.
It may be either an unqualified method name such as
"fred" or it may include argument type information
in parenthesis, for example "fred(int,String)". -->
<!ELEMENT method (#PCDATA)>

<!-- Integer thread ID. -->
<!ELEMENT thread (#PCDATA)>

<!-- The message element contains the text string of a log message. -->
<!ELEMENT message (#PCDATA)>

<!-- If the message string was localized, the key element provides
the original localization message key. -->
<!ELEMENT key (#PCDATA)>

<!-- If the message string was localized, the catalog element provides
the logger's localization resource bundle name. -->
<!ELEMENT catalog (#PCDATA)>

<!-- If the message string was localized, each of the param elements
provides the String value (obtained using Object.toString())
of the corresponding LogRecord parameter. -->
<!ELEMENT param (#PCDATA)>

<!-- An exception consists of an optional message string followed
by a series of StackFrames. Exception elements are used
for Java exceptions and other java Throwables. -->
<!ELEMENT exception (message?, frame+)>

<!-- A frame describes one line in a Throwable backtrace. -->
<!ELEMENT frame (class, method, line?)>

<!-- an integer line number within a class's source file. -->
<!ELEMENT line (#PCDATA)>
Comment 1 Dave Smith CLA 2005-01-19 00:59:52 EST
Can't contain work in 4.0
Comment 2 Dave Smith CLA 2005-02-07 02:01:07 EST
Theme: Appealing to the Broader Community 
Comment 3 Ruth Lee CLA 2005-02-21 18:53:29 EST
Changing Version/Target to 4.0 because it is one of the features committed for
4.0. You can see the official feature list here:
http://eclipse.org/tptp/home/project_info/featureplans/features.php?source=All&project=All&release=4.0&file=TPTPFeatures_4.xml
Comment 4 Paul Slauenwhite CLA 2005-02-23 12:22:19 EST
Created attachment 18247 [details]
Sample adapter file.

NOTE: The enclosed sample adapter file does not strictly follow the mapping in
org.eclipse.hyades.logging.java14.XmlFormatter and does not include support for
the following elements:

-key
-catalog
-param
-exception
Comment 5 Ruth Lee CLA 2005-02-23 17:01:41 EST
Submitting to the 4.1 "Active Review" list, which can be read here:
http://dev.eclipse.org/viewcvs/indextools.cgi/~checkout~/hyades-home/docs/unapproveddrafts/project%20info/plans/3+/TPTPFeatures.html
Comment 6 Ruth Lee CLA 2005-07-12 10:58:20 EDT
Deferring from 4.1 as per the official 4.1 enhancement plan.
http://eclipse.org/tptp/home/project_info/featureplans/features.php?source=All&project=All&release=4.1&file=TPTPFeatures_4.1.xml
Comment 7 Paul Slauenwhite CLA 2005-11-14 08:09:26 EST
Created attachment 29858 [details]
Sample log file #1.
Comment 8 Paul Slauenwhite CLA 2005-11-14 08:10:22 EST
Created attachment 29859 [details]
Sample log file #2.
Comment 9 Paul Slauenwhite CLA 2005-11-14 08:12:10 EST
Created attachment 29860 [details]
Sample adapter file #1.
Comment 10 Paul Slauenwhite CLA 2005-11-14 08:12:20 EST
Created attachment 29861 [details]
Sample adapter file #2.
Comment 11 Rohit Shetty CLA 2005-12-06 12:39:39 EST
Created attachment 31216 [details]
Patch
Comment 12 Rohit Shetty CLA 2005-12-06 12:53:21 EST
The attached Patch contains all the required modifications .i.e. the static parser, plugin entries etc.
Comment 13 Dave Smith CLA 2005-12-06 13:01:16 EST
Targetting this to 4.2 because Rohit has done the development work and attached a patch.
Comment 14 Dave Smith CLA 2005-12-06 13:09:09 EST
New logParser extension contributes properties that are shown in the Log Import Wizard and need to be translated.
Comment 15 Rohit Shetty CLA 2005-12-07 01:17:53 EST
Created attachment 31274 [details]
Patch

Patch generated by the "Create Patch" command
Comment 16 Dave Smith CLA 2005-12-07 10:38:00 EST
Cadidate for 4.2
Comment 17 Dave Smith CLA 2006-01-26 15:56:30 EST
Committed changes to TPTP Head CVS.

The following new files were added to the org.eclipse.hyades.logging.parsers plugin:

src/org.eclipse.hyades.logging.parsers.JavaLoggingXMLLogParser.java
src/org.eclipse.hyades.logging.parsers.internal.util.JavaLoggingSAXHandler.java
config/XML/Java/logging/v1.4/example.log
config/XML/Java/logging/v1.4/run_example.bat
config/XML/Java/logging/v1.4/run_example.sh
config/XML/Java/logging/v1.4/static_example.adapter
config/XML/Java/logging/v1.4/static.adapter

The following files were changed:
src/org.eclipse.hyades.logging.parsers.Parser.java
src/org.eclipse.hyades.logging.parsers.ParserConstants.java
src/org.eclipse.hyades.logging.parsers.ParserUtilities.java
plugin.xml - logParser and logParserSet extensions were added for this parser
plugin.properties
Comment 18 Paul Slauenwhite CLA 2006-03-06 11:33:13 EST
Verified in the TPTP-4.2.0-200602281515 driver.