def get_logs(self, decode_logs=True):
        """
        :param decode_logs: bool, docker by default output logs in simple json structure:
            { "stream": "line" }
            if this arg is set to True, it decodes logs to human readable form
        :return: str
        """
        logs = graceful_chain_get(self.get_annotations_or_labels(), "logs")
        if not logs:
            logger.error("no logs")
            return ""
        if decode_logs:
            output = []
            for line in logs.split("\n"):
                try:
                    decoded_line = json.loads(line)
                except __HOLE__:
                    continue
                output += [decoded_line.get("stream", "").strip()]
                error = decoded_line.get("error", "").strip()
                if error:
                    output += [error]
                error_detail = decoded_line.get("errorDetail", {})
                error_msg = error_detail.get("message", "").strip()
                if error_msg:
                    output += [error_msg]
            output += "\n"
            return "\n".join(output)
        else:
            return logs
dataset/ETHPy150Open projectatomic/osbs-client/osbs/build/build_response.py/BuildResponse.get_logs