#NEWLINE# def set_level( request , level ) : #NEWLINE# #INDENT# '\n    Sets the minimum level of messages to be recorded, returning ``True`` if\n    the level was recorded successfully.\n\n    If set to ``None``, the default level will be used (see the ``get_level``\n    method).\n    ' #NEWLINE# if ( not hasattr ( level , '_messages' ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# request . _messages . level = level #NEWLINE# return True