diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-25 20:12:44 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-25 20:12:44 -0700 |
commit | d5ac38d9edce323a46cb1b757e479cce5379675a (patch) | |
tree | 6982ce50ca63216a4e30701299688980a1e1c2e5 /main.c | |
parent | 117008a0077c852ce028a37b18013e612da9ecbd (diff) | |
download | subsurface-d5ac38d9edce323a46cb1b757e479cce5379675a.tar.gz |
Allow debug output to go either to log file or to stderr
This makes it easier to debug things in a debugger, but the infrastructure
to send out debug builds where an end user can send in a useful logfile is
still in place.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -242,7 +242,9 @@ int main(int argc, char **argv) init_ui(&argc, &argv); -#ifdef DEBUGFILE +#if DEBUGFILE > 1 + debugfile = stderr; +#elif defined(DEBUGFILE) debugfilename = (char *)subsurface_default_filename(); strncpy(debugfilename + strlen(debugfilename) - 3, "log", 3); if (g_mkdir_with_parents(g_path_get_dirname(debugfilename), 0664) != 0 || |