async def shutdown(self):
if self._was_shutdown:<EOL><INDENT>return<EOL><DEDENT>self._was_shutdown = True<EOL>for handler in reversed(self.handlers):<EOL><INDENT>if not handler:<EOL><INDENT>continue<EOL><DEDENT>try:<EOL><INDENT>if handler.initialized:<EOL><INDENT>await handler.flush()<EOL>await handler.close()<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>"""<STR_LIT>"""<EOL>pass<EOL><DEDENT><DEDENT>
Perform any cleanup actions in the logging system (e.g. flushing
buffers).

Should be called at application exit.