--- hatari/src/debug/log.c 2019/04/09 08:54:20 1.1.1.5 +++ hatari/src/debug/log.c 2019/04/09 08:55:33 1.1.1.6 @@ -28,6 +28,7 @@ const char Log_fileid[] = "Hatari log.c #include "screen.h" #include "file.h" #include "vdi.h" +#include "options.h" int ExceptionDebugMask; @@ -134,6 +135,14 @@ static flagname_t TraceFlags[] = { { TRACE_NATFEATS , "natfeats" } , + { TRACE_KEYMAP , "keymap" } , + + { TRACE_MIDI , "midi" } , + + { TRACE_IDE , "ide" } , + + { TRACE_OS_BASE , "os_base" } , + { TRACE_ALL , "all" } }; #endif /* ENABLE_TRACING */ @@ -148,6 +157,16 @@ static LOGTYPE AlertDlgLogLevel; /*-----------------------------------------------------------------------*/ /** + * Set default files to stderr (used at the very start, before parsing options) + */ +void Log_Default(void) +{ + hLogFile = stderr; + TraceFile = stderr; +} + +/*-----------------------------------------------------------------------*/ +/** * Initialize the logging and tracing functionality (open the log files etc.). * * Return zero if that fails. @@ -397,6 +416,9 @@ const char* Log_SetTraceOptions (const c if (LogTraceFlags & (TRACE_OS_AES|TRACE_OS_VDI)) bVdiAesIntercept = true; + if ((LogTraceFlags & TRACE_OS_BASE) && ConOutDevice == CONOUT_DEVICE_NONE) + ConOutDevice = 2; + return errstr; }