[Win] Print log to stderr instead of debug.log.
This commit is contained in:
parent
7047e5167f
commit
2282c53485
2 changed files with 17 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "app/atom_main_delegate.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
#include "browser/atom_browser_client.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "renderer/atom_renderer_client.h"
|
||||
|
@ -17,6 +18,21 @@ AtomMainDelegate::AtomMainDelegate() {
|
|||
AtomMainDelegate::~AtomMainDelegate() {
|
||||
}
|
||||
|
||||
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
// Disable logging out to debug.log on Windows
|
||||
#if defined(OS_WIN)
|
||||
logging::InitLogging(
|
||||
L"debug.log",
|
||||
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
|
||||
logging::LOCK_LOG_FILE,
|
||||
logging::DELETE_OLD_LOG_FILE,
|
||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
|
||||
logging::SetLogItems(true, false, true, false);
|
||||
#endif
|
||||
|
||||
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
||||
}
|
||||
|
||||
void AtomMainDelegate::PreSandboxStartup() {
|
||||
brightray::MainDelegate::PreSandboxStartup();
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ class AtomMainDelegate : public brightray::MainDelegate {
|
|||
~AtomMainDelegate();
|
||||
|
||||
protected:
|
||||
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
|
||||
virtual void PreSandboxStartup() OVERRIDE;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue