def formatter(formatter, update_custom_handlers=False):
for handler in list(logger.handlers):<EOL><INDENT>if hasattr(handler, LOGZERO_INTERNAL_LOGGER_ATTR) or update_custom_handlers:<EOL><INDENT>handler.setFormatter(formatter)<EOL><DEDENT><DEDENT>global _formatter<EOL>_formatter = formatter<EOL>
Set the formatter for all handlers of the default logger (``logzero.logger``).

This reconfigures only the logzero internal handlers by default, but you can also
reconfigure custom handlers by using ``update_custom_handlers=True``.

Beware that setting a formatter which uses colors also may write the color codes
to logfiles.

:arg Formatter formatter: `Python logging Formatter object <https://docs.python.org/2/library/logging.html#formatter-objects>`_ (by default uses the internal LogFormatter).
: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`