(handlerList=_handlerList)
Perform any cleanup actions in the logging system (e.g. flushing
    buffers).

    Should be called at application exit.
Perform any cleanup actions in the logging system (e.g. flushing
    buffers).
Perform any cleanup actions in the logging system ( e . g . flushing buffers ) .
def shutdown(handlerList=_handlerList):
    """
    Perform any cleanup actions in the logging system (e.g. flushing
    buffers).

    Should be called at application exit.
    """
    for wr in reversed(handlerList[:]):
        #errors might occur, for example, if files are locked
        #we just ignore them if raiseExceptions is not set
        try:
            h = wr()
            if h:
                try:
                    h.acquire()
                    h.flush()
                    h.close()
                except (OSError, ValueError):
                    # Ignore errors which might be caused
                    # because handlers have been closed but
                    # references to them are still around at
                    # application exit.
                    pass
                finally:
                    h.release()
        except: # ignore everything, as we're shutting down
            if raiseExceptions:
                raise
def shutdown ( handlerList = _handlerList ) : for wr in reversed ( handlerList [ : ] ) : #errors might occur, for example, if files are locked #we just ignore them if raiseExceptions is not set try : h = wr ( ) if h : try : h . acquire ( ) h . flush ( ) h . close ( ) except ( OSError , ValueError ) : # Ignore errors which might be caused # because handlers have been closed but # references to them are still around at # application exit. pass finally : h . release ( ) except : # ignore everything, as we're shutting down if raiseExceptions : raise