summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine.cpp
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2020-05-30 08:34:30 -0400
committer GitHub <noreply@github.com>2020-05-30 08:34:30 -0400
commita3a14014ac625f4176a4d50ce1b2b7efbe82078d (patch)
tree9a5dbe5e54a7bb6fa3756e6af7fb6cd4f6539719 /src/emu/machine.cpp
parentbdf4e2cc930d0d2596cb8c6c9de944fcd0dcf7d7 (diff)
parentfd62dad94985384057e83a0853e517470ca05bd9 (diff)
Merge pull request #6660 from Stevie-O/debug-console-logging
Debugger - add `-debuglog` option to log debug console output to file
Diffstat (limited to 'src/emu/machine.cpp')
-rw-r--r--src/emu/machine.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 7b86af34925..8955446ec3c 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -314,12 +314,20 @@ int running_machine::run(bool quiet)
m_logfile = std::make_unique<emu_file>(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
osd_file::error filerr = m_logfile->open("error.log");
if (filerr != osd_file::error::NONE)
- throw emu_fatalerror("running_machine::run: unable to open log file");
+ throw emu_fatalerror("running_machine::run: unable to open error.log file");
using namespace std::placeholders;
add_logerror_callback(std::bind(&running_machine::logfile_callback, this, _1));
}
+ if (options().debug() && options().debuglog())
+ {
+ m_debuglogfile = std::make_unique<emu_file>(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
+ osd_file::error filerr = m_debuglogfile->open("debug.log");
+ if (filerr != osd_file::error::NONE)
+ throw emu_fatalerror("running_machine::run: unable to open debug.log file");
+ }
+
// then finish setting up our local machine
start();