From c4a5969d7f263c07982bdd1773dc6185fb120aa1 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 28 Nov 2024 10:41:06 +0800 Subject: [PATCH] uniform show format --- tools/shell/src/shellEngine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 713f6757da..18d56c23aa 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1091,7 +1091,7 @@ void shellCleanupHistory() { void shellPrintError(TAOS_RES *tres, int64_t st) { int64_t et = taosGetTimestampUs(); - fprintf(stderr, "\r\nDB error: %s[%08X] (%.6fs)\r\n", taos_errstr(tres), taos_errno(tres), (et - st) / 1E6); + fprintf(stderr, "\r\nDB error:[%08X] %s (%.6fs)\r\n", taos_errno(tres), taos_errstr(tres), (et - st) / 1E6); taos_free_result(tres); } @@ -1303,7 +1303,7 @@ int32_t shellExecute() { #ifdef WEBSOCKET if (shell.args.restful || shell.args.cloud) { if (shell_conn_ws_server(1)) { - printf("failed to connect to server, error code:0x08x reason: %s\n", ws_errno(NULL), ws_errstr(NULL)); + printf("failed to connect to server, error code:0x08X reason: %s\n", ws_errno(NULL), ws_errstr(NULL)); fflush(stdout); return -1; } @@ -1316,7 +1316,7 @@ int32_t shellExecute() { } if (shell.conn == NULL) { - printf("failed to connect to server, reason: %s[%0x08x]\n",taos_errstr(NULL), taos_errno(NULL)); + printf("failed to connect to server, error code:0x%08X reason: %s\n", taos_errno(NULL), taos_errstr(NULL)); fflush(stdout); return -1; }