RequireDebugTrue
This class is a logging filter that only allows records to pass when the application's DEBUG setting is set to True. It provides a simple mechanism to restrict specific log output to development or debugging environments.
Methods
filter()
@classmethod
def filter(
record: LogRecord
) - > boolean
Determines whether a log record should be processed based on the application's debug state.
Parameters
| Name | Type | Description |
|---|---|---|
| record | LogRecord | The logging record object to be evaluated by the filter. |
Returns
| Type | Description |
|---|---|
boolean | True if the DEBUG setting is enabled, allowing the log record to be processed; otherwise False. |