'Reads everything that is currently available in the output.
Read output is both returned and logged. See `Logging` section for more
information about log levels.'

def read(self, loglevel=None):

    self._verify_connection()
    output = self.read_very_eager()
    if self._terminal_emulator:
        self._terminal_emulator.feed(output)
        output = self._terminal_emulator.read()
    else:
        output = self._decode(output)
    self._log(output, loglevel)
    return output
