chore: disable log output on windows platform
This commit is contained in:
parent
4c5f46b308
commit
4f33875f16
|
@ -240,6 +240,7 @@ static int32_t dmParseArgs(int32_t argc, char const *argv[]) {
|
|||
}
|
||||
} else if (strcmp(argv[i], "-k") == 0) {
|
||||
global.generateGrant = true;
|
||||
#ifndef WINDOWS
|
||||
} else if (strcmp(argv[i], "-o") == 0 || strcmp(argv[i], "--log-output") == 0 ||
|
||||
strncmp(argv[i], "--log-output=", 13) == 0) {
|
||||
if ((i < argc - 1) || ((i == argc - 1) && strncmp(argv[i], "--log-output=", 13) == 0)) {
|
||||
|
@ -264,6 +265,7 @@ static int32_t dmParseArgs(int32_t argc, char const *argv[]) {
|
|||
printf("'%s' requires a parameter\n", argv[i]);
|
||||
return TSDB_CODE_INVALID_CFG;
|
||||
}
|
||||
#endif
|
||||
} else if (strcmp(argv[i], "-y") == 0) {
|
||||
global.generateCode = true;
|
||||
if (i < argc - 1) {
|
||||
|
@ -341,7 +343,9 @@ static void dmPrintHelp() {
|
|||
printf("%s%s%s%s\n", indent, "-e,", indent, DM_ENV_CMD);
|
||||
printf("%s%s%s%s\n", indent, "-E,", indent, DM_ENV_FILE);
|
||||
printf("%s%s%s%s\n", indent, "-k,", indent, DM_MACHINE_CODE);
|
||||
#ifndef WINDOWS
|
||||
printf("%s%s%s%s\n", indent, "-o, --log-output=OUTPUT", indent, DM_LOG_OUTPUT);
|
||||
#endif
|
||||
printf("%s%s%s%s\n", indent, "-y,", indent, DM_SET_ENCRYPTKEY);
|
||||
printf("%s%s%s%s\n", indent, "-dm,", indent, DM_MEM_DBG);
|
||||
printf("%s%s%s%s\n", indent, "-V,", indent, DM_VERSION);
|
||||
|
|
|
@ -79,7 +79,9 @@ void shellPrintHelp() {
|
|||
printf("%s%s%s%s\r\n", indent, "-l,", indent, SHELL_PKT_LEN);
|
||||
printf("%s%s%s%s\r\n", indent, "-n,", indent, SHELL_NET_ROLE);
|
||||
printf("%s%s%s%s\r\n", indent, "-N,", indent, SHELL_PKT_NUM);
|
||||
#ifndef WINDOWS
|
||||
printf("%s%s%s%s\r\n", indent, "-o,", indent, SHELL_LOG_OUTPUT);
|
||||
#endif
|
||||
printf("%s%s%s%s\r\n", indent, "-p,", indent, SHELL_PASSWORD);
|
||||
printf("%s%s%s%s\r\n", indent, "-P,", indent, SHELL_PORT);
|
||||
printf("%s%s%s%s\r\n", indent, "-r,", indent, SHELL_RAW_TIME);
|
||||
|
@ -140,7 +142,9 @@ static struct argp_option shellOptions[] = {
|
|||
#endif
|
||||
{"pktnum", 'N', "PKTNUM", 0, SHELL_PKT_NUM},
|
||||
{"bimode", 'B', 0, 0, SHELL_BI_MODE},
|
||||
#ifndef WINDOWS
|
||||
{"log-output", 'o', "OUTPUT", 0, SHELL_LOG_OUTPUT},
|
||||
#endif
|
||||
{0},
|
||||
};
|
||||
|
||||
|
@ -229,6 +233,7 @@ static int32_t shellParseSingleOpt(int32_t key, char *arg) {
|
|||
case 'N':
|
||||
pArgs->pktNum = atoi(arg);
|
||||
break;
|
||||
#ifndef WINDOWS
|
||||
case 'o':
|
||||
if (strlen(arg) >= PATH_MAX) {
|
||||
printf("failed to set log output since length overflow, max length is %d\n", PATH_MAX);
|
||||
|
@ -244,6 +249,7 @@ static int32_t shellParseSingleOpt(int32_t key, char *arg) {
|
|||
return terrno;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef WEBSOCKET
|
||||
case 'R':
|
||||
pArgs->restful = true;
|
||||
|
|
Loading…
Reference in New Issue