def connection_lost(self, exc):
if exc:<EOL><INDENT>log.exception('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>log.info('<STR_LIT>')<EOL><DEDENT>if self.disconnect_callback:<EOL><INDENT>self.disconnect_callback(exc)<EOL><DEDENT>
Log when connection is closed, if needed call callback.