Skip to content

Commit

Permalink
fix: Windows logger path (#18199)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nitsakh committed May 20, 2019
1 parent 5a7b56b commit 9c21c66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion atom/app/atom_main_delegate.cc
Expand Up @@ -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
Expand Down

0 comments on commit 9c21c66

Please sign in to comment.