clp_ffi_py.wildcard_query module#
- class clp_ffi_py.wildcard_query.FullStringWildcardQuery[source]#
Bases:
WildcardQueryA wildcard query where the query must match the entirety of the log event’s message, in contrast with
SubstringWildcardQuerywhere the query only needs to match a substring.This class is derived from
WildcardQueryas 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:
WildcardQueryA wildcard query that can match a substring in a log event’s message, in contrast with
FullStringWildcardQuerywhere the query needs to match the entire message.This class is derived from
WildcardQueryby adding both a prefix and a postfix wildcard (“*”) to the input wildcard string.
- class clp_ffi_py.wildcard_query.WildcardQuery[source]#
Bases:
objectAn abstract class defining a wildcard query. Users should instantiate a wildcard query through
SubstringWildcardQueryorFullStringWildcardQuery.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:
WildcardQuerywill soon be made abstract and should not be used directly. To create a wildcard query, useSubstringWildcardQueryorFullStringWildcardQueryinstead.
- property case_sensitive: bool#
- property wildcard_query: str#