[Win] Write log to file in Debug build.
This commit is contained in:
parent
e248e2ffc8
commit
7d61dcdde1
2 changed files with 12 additions and 1 deletions
|
@ -23,12 +23,16 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
logging::InitLogging(
|
logging::InitLogging(
|
||||||
L"debug.log",
|
L"debug.log",
|
||||||
|
#if defined(DEBUG)
|
||||||
|
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG ,
|
||||||
|
#else
|
||||||
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
|
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
|
||||||
|
#endif // defined(NDEBUG)
|
||||||
logging::LOCK_LOG_FILE,
|
logging::LOCK_LOG_FILE,
|
||||||
logging::DELETE_OLD_LOG_FILE,
|
logging::DELETE_OLD_LOG_FILE,
|
||||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
|
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
|
||||||
logging::SetLogItems(true, false, true, false);
|
logging::SetLogItems(true, false, true, false);
|
||||||
#endif
|
#endif // defined(OS_WIN)
|
||||||
|
|
||||||
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
||||||
}
|
}
|
||||||
|
|
7
atom.gyp
7
atom.gyp
|
@ -181,6 +181,13 @@
|
||||||
# Rules for excluding e.g. foo_win.cc from the build on non-Windows.
|
# Rules for excluding e.g. foo_win.cc from the build on non-Windows.
|
||||||
'filename_rules.gypi',
|
'filename_rules.gypi',
|
||||||
],
|
],
|
||||||
|
'configurations': {
|
||||||
|
'Debug': {
|
||||||
|
'defines': [
|
||||||
|
'DEBUG',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue