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

Unified Diff: chrome/test/webdriver/webdriver_logging.cc

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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/webdriver_logging.cc
diff --git a/chrome/test/webdriver/webdriver_logging.cc b/chrome/test/webdriver/webdriver_logging.cc
index feae90cc7ff23a39614eab4b08b2ef38ba2428ae..54280825fbbb63a15b12a40e4a4c001d0988ae68 100644
--- a/chrome/test/webdriver/webdriver_logging.cc
+++ b/chrome/test/webdriver/webdriver_logging.cc
@@ -24,6 +24,21 @@ FileLog* FileLog::singleton_ = NULL;
double start_time = 0;
+LogLevel LogLevelFromString(const std::string& name) {
+ // Default logging level is INFO.
+ LogLevel level = kInfoLogLevel;
kkania 2012/05/21 17:46:46 If they pass "OFF", this will get set to INFO, whi
zori 2012/05/21 23:42:33 I think FINEST->ALL. On 2012/05/21 17:46:46, kkan
+ if (name == "SEVERE") {
kkania 2012/05/21 17:46:46 although the doc seems to suggest it will be caps,
zori 2012/05/21 23:42:33 Done.
+ level = kSevereLogLevel;
+ } else if (name == "WARNING") {
+ level = kWarningLogLevel;
+ } else if (name == "FINE") {
+ level = kFineLogLevel;
+ } else if (name == "FINER") {
+ level = kFinerLogLevel;
+ }
+ return level;
+}
+
// static
bool LogType::FromString(const std::string& name, LogType* log_type) {
if (name == "driver") {
« chrome/test/webdriver/webdriver_logging.h ('K') | « chrome/test/webdriver/webdriver_logging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698