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 (“*”).

__init__(full_string_wildcard_query, case_sensitive=False)[source]#

Initializes a full-string wildcard query using the given parameters.

Parameters:
  • full_string_wildcard_query (str) – Wildcard query string.

  • case_sensitive (bool) – Whether to perform case-sensitive matching.

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.

__init__(substring_wildcard_query, case_sensitive=False)[source]#

Initializes a substring wildcard query using the given parameters.

Parameters:
  • substring_wildcard_query (str) – Wildcard query string.

  • case_sensitive (bool) – Whether to perform case-sensitive matching.

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 or FullStringWildcardQuery.

A wildcard string may contain the following types of wildcards:

  1. ‘*’: match 0 or more characters.

  2. ‘?’: 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, use SubstringWildcardQuery or FullStringWildcardQuery instead.

property case_sensitive: bool#
property wildcard_query: str#