def loglevel(level=logging.DEBUG, update_custom_handlers=False):
logger.setLevel(level)<EOL>for handler in list(logger.handlers):<EOL><INDENT>if hasattr(handler, LOGZERO_INTERNAL_LOGGER_ATTR) or update_custom_handlers:<EOL><INDENT>if hasattr(handler, LOGZERO_INTERNAL_HANDLER_IS_CUSTOM_LOGLEVEL):<EOL><INDENT>continue<EOL><DEDENT>handler.setLevel(level)<EOL><DEDENT><DEDENT>global _loglevel<EOL>_loglevel = level<EOL>
Set the minimum loglevel for the default logger (`logzero.logger`).

This reconfigures only the internal handlers of the default logger (eg. stream and logfile).
You can also update the loglevel for custom handlers by using `update_custom_handlers=True`.

:arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: `logging.DEBUG`).
:arg bool update_custom_handlers: If you added custom handlers to this logger and want this to update them too, you need to set `update_custom_handlers` to `True`