/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

  1. <?xml version="1.0"?>
  2. <!--
  3. The root element is "logs". This element holds all definitions for log
  4. types. "logs" holds zero or more "log" elements.
  5. -->
  6. <!ELEMENT logs (log*)>
  7. <!--
  8. The "log" element contains the description for a specific type of log
  9. file. Logs can be identified by either a file name glob (a regular
  10. expression used to match the file name), a first line glob (a regular
  11. expression used to match the first line of the file), or both.
  12. The "log" element also contains elements that will be used to parse the
  13. individual log entries and labels to be used for each column.
  14. All "log" elements must be named.
  15. -->
  16. <!ELEMENT log (file_name_glob, first_line_glob, entry_regex, (column_regex|column_delimiter), columns)>
  17. <!--
  18. The name for the "log" element.
  19. -->
  20. <!ATTLIST log name #REQUIRED>
  21. <!--
  22. A regular expression used to match the log file name, for example,
  23. "weblogic.*" would match filenames like "weblogic.log", "weblogic.log00001",
  24. and so on.
  25. -->
  26. <!ELEMENT file_name_glob (#CDATA)>
  27. <!--
  28. A regular expression used to match the first non-blank line of the log file, for
  29. example, "####*" would match
  30. "####Aug 2, 2005 12:54:08 PM PDT INFO Server started."
  31. -->
  32. <!ELEMENT first_line_glob (#CDATA)>
  33. <!--
  34. A regular expression used to separate a log file into log entries. By
  35. default, each log entry is assumed to be a single line in the log file.
  36. Some log files may have entries spanning multiple lines, this element is
  37. used to find the end of such entries.
  38. -->
  39. <!ELEMENT entry_separator (#CDATA)>
  40. <!--
  41. This element describes a log entry. A log entry may span more than one
  42. line in a log file, that is, a log entry may contain 0 or more carriage
  43. return and/or new line characters. By default, the "dotall" attribute
  44. is true.
  45. Entries must match the regex to be included in the output display. Entries
  46. that don't match are not shown.
  47. The regular expression and the attributes are the same as those described
  48. in the java.util.regex.Pattern documentation.
  49. -->
  50. <!ELEMENT entry_regex (#CDATA)>
  51. <!ATTLIST entry_regex case_insensitive (true|false) "false">
  52. <!ATTLIST entry_regex dotall (true|false) "true">
  53. <!ATTLIST entry_regex multiline (true|false) "false">
  54. <!ATTLIST entry_regex unicode_case (true|false) "false">
  55. <!ATTLIST entry_regex canon_eq (true|false) "false">
  56. <!ATTLIST entry_regex unix_lines (true|false) "false">
  57. <!--
  58. This element describes how an individual entry is to be split into columns.
  59. The "group" attribute is used to determine which parts of the resulting
  60. regex matches should be used for display. For example, given an entry like:
  61. 192.168.99.5 - - [02/Nov/2005:20:30:20 -0800] "GET /comix.html HTTP/1.1" 200 5653
  62. and a regex:
  63. (.*?) (.*?) (.*?) [\[](.*?)[\]] ["](.*?)["] (.*?) (.*?)(?m)$
  64. with groups 1, 4, 5, 6, 7
  65. then the 2 dashes after the IP address will not be included in the display.
  66. The regular expression and the attributes are the same as those described
  67. in the java.util.regex.Pattern documentation.
  68. -->
  69. <!ELEMENT column_regex (#CDATA)>
  70. <!ATTLIST column_regex group #IMPLIED>
  71. <!ATTLIST column_regex case_insensitive (true|false) "false">
  72. <!ATTLIST column_regex dotall (true|false) "false">
  73. <!ATTLIST column_regex multiline (true|false) "false">
  74. <!ATTLIST column_regex unicode_case (true|false) "false">
  75. <!ATTLIST column_regex canon_eq (true|false) "false">
  76. <!ATTLIST column_regex unix_lines (true|false) "false">
  77. <!--
  78. A log file may have lines that are delimited.
  79. -->
  80. <!ELEMENT column_delimiter (#CDATA)>
  81. <!--
  82. The "columns" element assigns a name to each column found in a line in a
  83. log file.
  84. -->
  85. <!ELEMENT columns (column+)>
  86. <!--
  87. A "column" is the name of a column in a log file, like "Timestamp" or
  88. "Severity". A log file may have a fixed width layout, if so, the width of
  89. the column can be specified here. A column width may be set to any
  90. non-negative number, 0 width columns will be hidden in LogViewer. An
  91. offset from the start of the entry may be included also.
  92. -->
  93. <!ELEMENT column (#CDATA)>
  94. <!ELEMENT column offset #IMPLIED>
  95. <!ATTLIST column width #IMPLIED>