Block all internal logs when running without `--enable-logging`
authorEran Tiktin <eran.t@mce-sys.com>
Sat, 10 Oct 2015 17:44:22 +0000 (20:44 +0300)
committerEran Tiktin <eran.t@mce-sys.com>
Sat, 10 Oct 2015 17:44:22 +0000 (20:44 +0300)
atom/app/atom_main_delegate.cc

index 6ba1b89..639340b 100644 (file)
@@ -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);