clp_ffi_py.wildcard_query module#
- class clp_ffi_py.wildcard_query.FullStringWildcardQuery[source]#
Bases:
WildcardQuery
A wildcard query where the query must match the entirety of the log event’s message, in contrast with
SubstringWildcardQuery
where the query only needs to match a substring.This class is derived from
WildcardQuery
as a more explicit interface for full-string matches.Users can create a match that’s anchored to only one end of the message by adding a prefix OR postfix wildcard (“*”).
- class clp_ffi_py.wildcard_query.SubstringWildcardQuery[source]#
Bases:
WildcardQuery
A wildcard query that can match a substring in a log event’s message, in contrast with
FullStringWildcardQuery
where the query needs to match the entire message.This class is derived from
WildcardQuery
by adding both a prefix and a postfix wildcard (“*”) to the input wildcard string.
- class clp_ffi_py.wildcard_query.WildcardQuery[source]#
Bases:
object
An abstract class defining a wildcard query. Users should instantiate a wildcard query through
SubstringWildcardQuery
orFullStringWildcardQuery
.A wildcard string may contain the following types of wildcards:
‘*’: match 0 or more characters.
‘?’: match any single character.
Each wildcard can be escaped using a preceding ‘\’ (a single backslash). Other characters that are escaped are treated as normal characters.
- __init__(wildcard_query, case_sensitive=False)[source]#
Initializes a wildcard query using the given parameters.
- Parameters:
wildcard_query (str) – Wildcard query string.
case_sensitive (bool) – Whether to perform case-sensitive matching.
Deprecated since version 0.0.12:
WildcardQuery
will soon be made abstract and should not be used directly. To create a wildcard query, useSubstringWildcardQuery
orFullStringWildcardQuery
instead.
- property case_sensitive: bool#
- property wildcard_query: str#