Code

sysdb: Simplified prompt used for continuation lines.
[sysdb.git] / src / tools / sysdb / input.c
index 898464af0b550118aa0367337a4e4b85460930c6..a1e7b714b689a85e946587624948a6d237eef78c 100644 (file)
@@ -160,7 +160,7 @@ input_readline(void)
        }
 
        if (sysdb_input->have_input)
-               prompt = "sysdb-> ";
+               prompt = "     -> ";
        if (sdb_client_eof(sysdb_input->client))
                prompt = "!-> ";
 
@@ -208,7 +208,7 @@ input_readline(void)
                if (sdb_client_eof(sysdb_input->client)) {
                        rl_callback_handler_remove();
                        /* XXX */
-                       printf("Remote side closed the connection.\n");
+                       sdb_log(SDB_LOG_ERR, "Remote side closed the connection.");
                        /* return EOF -> restart scanner */
                        return 0;
                }
@@ -307,10 +307,10 @@ sdb_input_reconnect(void)
 {
        sdb_client_close(sysdb_input->client);
        if (sdb_client_connect(sysdb_input->client, sysdb_input->user)) {
-               printf("Failed to reconnect to SysDBd.\n");
+               sdb_log(SDB_LOG_ERR, "Failed to reconnect to SysDBd");
                return -1;
        }
-       printf("Successfully reconnected to SysDBd.\n");
+       sdb_log(SDB_LOG_INFO, "Successfully reconnected to SysDBd");
        return 0;
 } /* sdb_input_reconnect */