summaryrefslogtreecommitdiffstats
path: root/core/subsurfacestartup.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-02-02 21:50:47 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-02-03 09:24:42 -0800
commit4a894e0713910e68a8744a3b34b95a91b31cabde (patch)
treea0a0b78e286d5b46112eaa8c2562aac5abd3b709 /core/subsurfacestartup.c
parent7c8461a328c6d93a89aeb4358bacf0201e940f35 (diff)
downloadsubsurface-4a894e0713910e68a8744a3b34b95a91b31cabde.tar.gz
Win32: add the --win32log option to log stdout and stderr to files
Adding --win32log as the first command line option on Windows will now log all stdout and stderr output to the files subsurface_err.log and subsurface_out.log in the working directory. This change required a new argument 'bool logfile' to be added to: subsurface_console_init() which is defined in all platform files (linux.c, macos.c, etc.) Example usage: subsurface.exe --win32log -v -v -v Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'core/subsurfacestartup.c')
-rw-r--r--core/subsurfacestartup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c
index 7bff43750..f240d139c 100644
--- a/core/subsurfacestartup.c
+++ b/core/subsurfacestartup.c
@@ -187,7 +187,8 @@ static void print_help()
printf("\n --survey Offer to submit a user survey");
printf("\n --user=<test> Choose configuration space for user <test>");
printf("\n --cloud-timeout=<nr> Set timeout for cloud connection (0 < timeout < 60)");
- printf("\n --win32console Create a dedicated console if needed (Windows only). Add option before everything else\n\n");
+ printf("\n --win32console Create a dedicated console if needed (Windows only). Add option before everything else");
+ printf("\n --win32log Write the program output to subsurface.log (Windows only). Add option before everything else\n\n");
}
void parse_argument(const char *arg)
@@ -245,6 +246,8 @@ void parse_argument(const char *arg)
}
if (strcmp(arg, "--win32console") == 0)
return;
+ if (strcmp(arg, "--win32log") == 0)
+ return;
/* fallthrough */
case 'p':
/* ignore process serial number argument when run as native macosx app */