From: Cheng Zhao Date: Tue, 20 Oct 2015 05:00:28 +0000 (+0800) Subject: Add ELECTRON_ENABLE_LOGGING env X-Git-Tag: v0.34.1~25^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2c4a24d26b8b2353c13fb3bc1ccc963c1107d377;p=electron.git Add ELECTRON_ENABLE_LOGGING env It is the same with --enable-logging. --- diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 44f2048c..392e4dcb 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -59,7 +59,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { #endif // !defined(OS_WIN) // Only enable logging when --enable-logging is specified. - if (!command_line->HasSwitch(switches::kEnableLogging)) { + scoped_ptr env(base::Environment::Create()); + if (!command_line->HasSwitch(switches::kEnableLogging) && + !env->HasVar("ELECTRON_ENABLE_LOGGING")) { settings.logging_dest = logging::LOG_NONE; logging::SetMinLogLevel(logging::LOG_NUM_SEVERITIES); }