set_level
Set the minimum level of messages to be recorded, and return True if the level was recorded successfully.
If set to None, use the default level (see the get_level() function).
def set_level(
request: HttpRequest,
level: integer|null
) - > boolean
Set the minimum level of messages to be recorded, and return True if the level was recorded successfully. If set to None, use the default level (see the get_level() function).
Parameters
| Name | Type | Description |
|---|---|---|
| request | HttpRequest | The current HTTP request object which must have a message storage backend initialized |
| level | `integer | null` |
Returns
| Type | Description |
|---|---|
boolean | True if the message level was successfully updated on the request object, False if the request lacks a message storage backend |