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

Side by Side Diff: chrome/test/webdriver/webdriver_logging.cc

Issue 8467028: Enable DVLOG on non official release build based on the parameter passed for InitLogging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/logging_installer.cc ('k') | chrome/tools/crash_service/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/webdriver/webdriver_logging.h" 5 #include "chrome/test/webdriver/webdriver_logging.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace { 11 namespace {
12 12
13 // Path to the WebDriver log file. 13 // Path to the WebDriver log file.
14 const FilePath::CharType kLogPath[] = FILE_PATH_LITERAL("chromedriver.log"); 14 const FilePath::CharType kLogPath[] = FILE_PATH_LITERAL("chromedriver.log");
15 15
16 } // namespace 16 } // namespace
17 17
18 namespace webdriver { 18 namespace webdriver {
19 19
20 void InitWebDriverLogging(int min_log_level) { 20 void InitWebDriverLogging(int min_log_level) {
21 bool success = InitLogging( 21 bool success = InitLogging(
22 kLogPath, 22 kLogPath,
23 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, 23 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
24 logging::LOCK_LOG_FILE, 24 logging::LOCK_LOG_FILE,
25 logging::DELETE_OLD_LOG_FILE, 25 logging::DELETE_OLD_LOG_FILE,
26 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 26 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS,
27 logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS);
27 if (!success) { 28 if (!success) {
28 PLOG(ERROR) << "Unable to initialize logging"; 29 PLOG(ERROR) << "Unable to initialize logging";
29 } 30 }
30 logging::SetLogItems(false, // enable_process_id 31 logging::SetLogItems(false, // enable_process_id
31 false, // enable_thread_id 32 false, // enable_thread_id
32 true, // enable_timestamp 33 true, // enable_timestamp
33 false); // enable_tickcount 34 false); // enable_tickcount
34 logging::SetMinLogLevel(min_log_level); 35 logging::SetMinLogLevel(min_log_level);
35 } 36 }
36 37
37 bool GetLogContents(std::string* log_contents) { 38 bool GetLogContents(std::string* log_contents) {
38 return file_util::ReadFileToString(FilePath(kLogPath), log_contents); 39 return file_util::ReadFileToString(FilePath(kLogPath), log_contents);
39 } 40 }
40 41
41 } // namespace webdriver 42 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/installer/util/logging_installer.cc ('k') | chrome/tools/crash_service/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698