Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`logger`.`LogLevelFilterPredicate``

class documentation

`class LogLevelFilterPredicate: (source)`

Constructor: `LogLevelFilterPredicate(defaultLogLevel)`

Implements interfaces: `twisted.logger.ILogFilterPredicate`

View In Hierarchy

`ILogFilterPredicate` that filters out events with a log level lower than the log level for the event's namespace.

Events that not not have a log level or namespace are also dropped.

Method | `__call__` | Determine whether an event should be logged.
Method | `__init__` | No summary
Method | `clearLogLevels` | Clears all log levels to the default.
Method | `logLevelForNamespace` | Determine an appropriate log level for the given namespace.
Method | `setLogLevelForNamespace` | Sets the log level for a logging namespace.
Instance Variable | `defaultLogLevel` | Undocumented
Instance Variable | `_logLevelsByNamespace` | Undocumented

def __call__(self, event: `LogEvent`) -> `NamedConstant`: (source)
from `twisted.logger.ILogFilterPredicate`

Determine whether an event should be logged.

Returns
`NamedConstant` | a `PredicateResult`.

def __init__(self, defaultLogLevel: `NamedConstant` = LogLevel.info): (source)

Parameters
defaultLogLevel:`NamedConstant` | The default minimum log level.

def clearLogLevels(self): (source)

Clears all log levels to the default.

def logLevelForNamespace(self, namespace: `str`) -> `NamedConstant`: (source)

Determine an appropriate log level for the given namespace.

This respects dots in namespaces; for example, if you have previously invoked `setLogLevelForNamespace("mypackage", LogLevel.debug)`, then `logLevelForNamespace("mypackage.subpackage")` will return `LogLevel.debug`.

Parameters
namespace:`str` | A logging namespace. Use `""` for the default namespace.
Returns
`NamedConstant` | The log level for the specified namespace.

def setLogLevelForNamespace(self, namespace: `str`, level: `NamedConstant`): (source)

Sets the log level for a logging namespace.

Parameters
namespace:`str` | A logging namespace.
level:`NamedConstant` | The log level for the given namespace.

defaultLogLevel = (source)

Undocumented

_logLevelsByNamespace: `Dict[str, NamedConstant]` = (source)

Undocumented