Events-log4j-parser: Difference between revisions
(→Usage) |
(→Usage) |
||
Line 21: | Line 21: | ||
=Usage= | =Usage= | ||
log4jp [command] [command options] | log4jp [command] [command options] [[#Query|query]] <file1> [file2 ...] | ||
The command is optional. When the command is missing, the implied command is "query", the given log file is parsed and the resulted events are matched against the query. Unless output filtering options are used, the events are displayed in their raw format, which is how they appear in the original log. | The command is optional. When the command is missing, the implied command is "query", the given log file is parsed and the resulted events are matched against the query. Unless output filtering options are used, the events are displayed in their raw format, which is how they appear in the original log. |
Revision as of 18:51, 28 July 2017
Internal
Overview
A library that produces timed events from log4j logs.
GitHub
Installation
Installs as a command line utility log4jp-<version>.zip.
TODO
./doc/Events log4j Parser TODO.docx.
Usage
log4jp [command] [command options] query <file1> [file2 ...]
The command is optional. When the command is missing, the implied command is "query", the given log file is parsed and the resulted events are matched against the query. Unless output filtering options are used, the events are displayed in their raw format, which is how they appear in the original log.
Commands:
- help
- version
- describe - displays a description of the events produced as the result of the parsing.
- time-gaps - identify time gaps in the log
- count (-c) - display the number of events that match the query.
For more details about commands (procedures), see:
Query
The query filters the events that will displayed.
A query contains:
- keywords
- event properties
- regular expressions
Keyword Query
The keyword query is by default case insensitive, unless ... is specified.
When multiple separate keywords are present in query, the query selects the union of events that contain each keyword.
blue red
will return all events that contain "blue" and all events that contain "red". Those events that contain both "blue" and "red" will be represented once in the returned set.
Note that:
blue red
and:
"blue red"
are different.
Keywords are matched against each property.
Event Property Query
Event property values can be queried using the following syntax:
property-name:exact-match
"Property query" and "field query" terms are currently used interchangeably.