Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: mojo/logging/init_logging.cc

Issue 2008383002: Remove a bunch of stuff in //mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/logging/init_logging.h ('k') | mojo/mojo_base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/logging/init_logging.cc
diff --git a/mojo/logging/init_logging.cc b/mojo/logging/init_logging.cc
deleted file mode 100644
index 13e28f88800701c32922f8235899edc0d0ef7a97..0000000000000000000000000000000000000000
--- a/mojo/logging/init_logging.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/logging/init_logging.h"
-
-#include "base/command_line.h"
-#include "base/logging.h"
-
-namespace mojo {
-namespace {
-
-::logging::LoggingDestination DetermineLogMode(
- const base::CommandLine& command_line) {
- // only use OutputDebugString in debug mode
-#if defined(NDEBUG)
- bool enable_logging = false;
- const char* kInvertLoggingSwitch = "enable-logging";
-#else
- bool enable_logging = true;
- const char* kInvertLoggingSwitch = "disable-logging";
-#endif
- const ::logging::LoggingDestination kDefaultLoggingMode =
- ::logging::LOG_TO_SYSTEM_DEBUG_LOG;
-
- if (command_line.HasSwitch(kInvertLoggingSwitch))
- enable_logging = !enable_logging;
-
- return enable_logging ? kDefaultLoggingMode : ::logging::LOG_NONE;
-}
-
-} // namespace
-
-void InitLogging() {
- ::logging::LoggingSettings settings;
- settings.logging_dest = DetermineLogMode(
- *base::CommandLine::ForCurrentProcess());
- ::logging::InitLogging(settings);
-
- // we want process and thread IDs because we have a lot of things running
- ::logging::SetLogItems(true, // enable_process_id
- true, // enable_thread_id
- true, // enable_timestamp
- false); // enable_tickcount
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/logging/init_logging.h ('k') | mojo/mojo_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698