mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
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>
This commit is contained in:
parent
117008a007
commit
d5ac38d9ed
1 changed files with 3 additions and 1 deletions
4
main.c
4
main.c
|
@ -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 ||
|
||||
|
|
Loading…
Add table
Reference in a new issue