RequireDebugFalse
This class is a logging filter that only allows records to pass when the application is not in debug mode. It checks the global settings to ensure that logging output is restricted during active development or debugging sessions.
Methods
filter()
@classmethod
def filter(
record: logging.LogRecord
) - > boolean
Determines whether a log record should be processed based on the application's debug state. This filter ensures that logs are only emitted when the DEBUG setting is False, preventing verbose logging in development environments.
Parameters
| Name | Type | Description |
|---|---|---|
| record | logging.LogRecord | The log record object to be evaluated by the filter. |
Returns
| Type | Description |
|---|---|
boolean | True if the DEBUG setting is False, indicating the log record should be processed; otherwise False. |