Add logging for OS login and execution

Change-Id: If82fd383137aef0f8e67f8f97da4452fde142ba5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index 38391d1..eeb2fa4 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -125,6 +125,7 @@
         gp.lprint_var(login_attempt_num)
         try:
             out_buf = sshlib.login(**login_args)
+            BuiltIn().log_to_console(out_buf)
         except Exception:
             # Login will sometimes fail if the connection is new.
             except_type, except_value, except_traceback = sys.exc_info()
@@ -239,6 +240,8 @@
         try:
             if fork:
                 sshlib.start_command(cmd_buf)
+                ssh_log_out = sshlib.read_command_output()
+                BuiltIn().log_to_console(ssh_log_out)
             else:
                 if open_connection_args['alias'] == "device_connection":
                     stdout = sshlib.write(cmd_buf)
@@ -252,6 +255,7 @@
                                        return_stderr=True,
                                        return_rc=True,
                                        time_out=time_out)
+                    BuiltIn().log_to_console(stdout)
         except Exception:
             except_type, except_value, except_traceback = sys.exc_info()
             gp.lprint_var(except_type)