Move debug command line line after opening the log file

This commit is contained in:
Stefan Rueger
2024-08-21 23:26:51 +01:00
parent b49fe93402
commit c6d29a1689

View File

@@ -928,10 +928,6 @@ int main(int argc, char *argv[]) {
}
}
msg_debug("$ "); // Record command line when debugging
for(int i = 0; i < argc; i++)
msg_debug("%s%c", str_ccsharg(argv[i]), i == argc - 1? '\n': ' ');
if(logfile != NULL) {
FILE *newstderr = freopen(logfile, "w", stderr);
@@ -942,6 +938,10 @@ int main(int argc, char *argv[]) {
}
}
msg_debug("$ "); // Record command line
for(int i = 0; i < argc; i++)
msg_debug("%s%c", str_ccsharg(argv[i]), i == argc - 1? '\n': ' ');
size_t ztest;
if(1 != sscanf("42", "%zi", &ztest) || ztest != 42)