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

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

Issue 10411031: Fixing loglevel in chrome driver to accept string rather than an integer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Changes on LogLevelFromString()." Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_ 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 // WebDriver logging levels. 23 // WebDriver logging levels.
24 enum LogLevel { 24 enum LogLevel {
25 kSevereLogLevel = 1000, 25 kSevereLogLevel = 1000,
26 kWarningLogLevel = 900, 26 kWarningLogLevel = 900,
27 kInfoLogLevel = 800, 27 kInfoLogLevel = 800,
28 kFineLogLevel = 500, 28 kFineLogLevel = 500,
29 kFinerLogLevel = 400, 29 kFinerLogLevel = 400,
30 kAllLogLevel = -1000 30 kAllLogLevel = -1000
31 }; 31 };
32 32
33 // |name| should be a webdriver log level, such as "INFO", "SEVERE", etc.
34 LogLevel LogLevelFromString(const std::string& name);
35
33 // Represents a type/source of a WebDriver log. 36 // Represents a type/source of a WebDriver log.
34 class LogType { 37 class LogType {
35 public: 38 public:
36 enum Type { 39 enum Type {
37 kInvalid = -1, 40 kInvalid = -1,
38 kDriver, 41 kDriver,
39 kNum // must be correct 42 kNum // must be correct
40 }; 43 };
41 44
42 static bool FromString(const std::string& name, LogType* log_type); 45 static bool FromString(const std::string& name, LogType* log_type);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Initializes logging for WebDriver. All logging below the given level 145 // Initializes logging for WebDriver. All logging below the given level
143 // will be discarded in the global file log. The file log will use the given 146 // will be discarded in the global file log. The file log will use the given
144 // log path. If the specified log path is empty, the log will write to 147 // log path. If the specified log path is empty, the log will write to
145 // 'chromedriver.log' in the current working directory, if writeable, or the 148 // 'chromedriver.log' in the current working directory, if writeable, or the
146 // system temp directory. Returns true on success. 149 // system temp directory. Returns true on success.
147 bool InitWebDriverLogging(const FilePath& log_path, LogLevel min_log_level); 150 bool InitWebDriverLogging(const FilePath& log_path, LogLevel min_log_level);
148 151
149 } // namespace webdriver 152 } // namespace webdriver
150 153
151 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_ 154 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698