Skip to main content

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

NameTypeDescription
recordLogRecordThe logging record object to be evaluated by the filter.

Returns

TypeDescription
booleanTrue if the DEBUG setting is enabled, allowing the log record to be processed; otherwise False.