зеркало из https://github.com/electron/electron.git
Block all internal logs when running without `--enable-logging`
This commit is contained in:
Родитель
4e8db2c3be
Коммит
cb903a09c0
|
@ -48,8 +48,10 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||
|
||||
// Only enable logging when --enable-logging is specified.
|
||||
auto command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (!command_line->HasSwitch(switches::kEnableLogging))
|
||||
if (!command_line->HasSwitch(switches::kEnableLogging)) {
|
||||
settings.logging_dest = logging::LOG_NONE;
|
||||
logging::SetMinLogLevel(logging::LOG_NUM_SEVERITIES);
|
||||
}
|
||||
|
||||
logging::InitLogging(settings);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче