From 9c21c66b9760e11ec0bfc5b29a43f2c578d9896f Mon Sep 17 00:00:00 2001 From: Nitish Sakhawalkar Date: Mon, 20 May 2019 10:41:30 -0700 Subject: [PATCH] fix: Windows logger path (#18199) Windows debug isn't logging because of a DCHECK failure during startup. This changes the logger initialization to use the absolute path, so that logging works again. --- atom/app/atom_main_delegate.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 518ca75c9320..05351e0bc1b2 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -138,7 +138,10 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { #if defined(DEBUG) // Print logging to debug.log on Windows settings.logging_dest = logging::LOG_TO_ALL; - settings.log_file = L"debug.log"; + base::FilePath log_filename; + base::PathService::Get(base::DIR_EXE, &log_filename); + log_filename = log_filename.AppendASCII("debug.log"); + settings.log_file = log_filename.value().c_str(); settings.lock_log = logging::LOCK_LOG_FILE; settings.delete_old = logging::DELETE_OLD_LOG_FILE; #else