class documentation
class LogLevelFilterPredicate: (source)
Constructor: LogLevelFilterPredicate(defaultLogLevel)
Implements interfaces: twisted.logger.ILogFilterPredicate
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 | clear |
Clears all log levels to the default. |
| Method | log |
Determine an appropriate log level for the given namespace. |
| Method | set |
Sets the log level for a logging namespace. |
| Instance Variable | default |
Undocumented |
| Instance Variable | _log |
Undocumented |
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. |