/plugins/LogViewer/tags/rel-0-6/src/doc/logviewer_types.dtd
# · Document Type Definition · 117 lines · 95 code · 22 blank · 0 comment · 0 complexity · 8f5c55ba3b5d838cd1bf4ecc18ed5bc6 MD5 · raw file
- <?xml version="1.0"?>
- <!--
- The root element is "logs". This element holds all definitions for log
- types. "logs" holds zero or more "log" elements.
- -->
- <!ELEMENT logs (log*)>
- <!--
- The "log" element contains the description for a specific type of log
- file. Logs can be identified by either a file name glob (a regular
- expression used to match the file name), a first line glob (a regular
- expression used to match the first line of the file), or both.
-
- The "log" element also contains elements that will be used to parse the
- individual log entries and labels to be used for each column.
-
- All "log" elements must be named.
- -->
- <!ELEMENT log (file_name_glob, first_line_glob, entry_regex, (column_regex|column_delimiter), columns)>
- <!--
- The name for the "log" element.
- -->
- <!ATTLIST log name #REQUIRED>
- <!--
- A regular expression used to match the log file name, for example,
- "weblogic.*" would match filenames like "weblogic.log", "weblogic.log00001",
- and so on.
- -->
- <!ELEMENT file_name_glob (#CDATA)>
- <!--
- A regular expression used to match the first non-blank line of the log file, for
- example, "####*" would match
- "####Aug 2, 2005 12:54:08 PM PDT INFO Server started."
- -->
- <!ELEMENT first_line_glob (#CDATA)>
- <!--
- A regular expression used to separate a log file into log entries. By
- default, each log entry is assumed to be a single line in the log file.
- Some log files may have entries spanning multiple lines, this element is
- used to find the end of such entries.
- -->
- <!ELEMENT entry_separator (#CDATA)>
- <!--
- This element describes a log entry. A log entry may span more than one
- line in a log file, that is, a log entry may contain 0 or more carriage
- return and/or new line characters. By default, the "dotall" attribute
- is true.
-
- Entries must match the regex to be included in the output display. Entries
- that don't match are not shown.
-
- The regular expression and the attributes are the same as those described
- in the java.util.regex.Pattern documentation.
- -->
- <!ELEMENT entry_regex (#CDATA)>
- <!ATTLIST entry_regex case_insensitive (true|false) "false">
- <!ATTLIST entry_regex dotall (true|false) "true">
- <!ATTLIST entry_regex multiline (true|false) "false">
- <!ATTLIST entry_regex unicode_case (true|false) "false">
- <!ATTLIST entry_regex canon_eq (true|false) "false">
- <!ATTLIST entry_regex unix_lines (true|false) "false">
- <!--
- This element describes how an individual entry is to be split into columns.
- The "group" attribute is used to determine which parts of the resulting
- regex matches should be used for display. For example, given an entry like:
-
- 192.168.99.5 - - [02/Nov/2005:20:30:20 -0800] "GET /comix.html HTTP/1.1" 200 5653
- and a regex:
-
- (.*?) (.*?) (.*?) [\[](.*?)[\]] ["](.*?)["] (.*?) (.*?)(?m)$
-
- with groups 1, 4, 5, 6, 7
-
- then the 2 dashes after the IP address will not be included in the display.
- The regular expression and the attributes are the same as those described
- in the java.util.regex.Pattern documentation.
- -->
- <!ELEMENT column_regex (#CDATA)>
- <!ATTLIST column_regex group #IMPLIED>
- <!ATTLIST column_regex case_insensitive (true|false) "false">
- <!ATTLIST column_regex dotall (true|false) "false">
- <!ATTLIST column_regex multiline (true|false) "false">
- <!ATTLIST column_regex unicode_case (true|false) "false">
- <!ATTLIST column_regex canon_eq (true|false) "false">
- <!ATTLIST column_regex unix_lines (true|false) "false">
- <!--
- A log file may have lines that are delimited.
- -->
- <!ELEMENT column_delimiter (#CDATA)>
- <!--
- The "columns" element assigns a name to each column found in a line in a
- log file.
- -->
- <!ELEMENT columns (column+)>
- <!--
- A "column" is the name of a column in a log file, like "Timestamp" or
- "Severity". A log file may have a fixed width layout, if so, the width of
- the column can be specified here. A column width may be set to any
- non-negative number, 0 width columns will be hidden in LogViewer. An
- offset from the start of the entry may be included also.
- -->
- <!ELEMENT column (#CDATA)>
- <!ELEMENT column offset #IMPLIED>
- <!ATTLIST column width #IMPLIED>