You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/05/03 18:19:26 UTC
[2/4] android commit: Deprecate in favour of
Deprecate <log> in favour of <preference name="loglevel">
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/b7990b7d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/b7990b7d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/b7990b7d
Branch: refs/heads/master
Commit: b7990b7df83413982a7d8eb115e1f13a6bd51c1a
Parents: 4b9047b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri May 3 12:11:09 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri May 3 12:11:09 2013 -0400
----------------------------------------------------------------------
framework/src/org/apache/cordova/Config.java | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b7990b7d/framework/src/org/apache/cordova/Config.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java
index 594c2b2..b9f81f0 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -97,7 +97,7 @@ public class Config {
}
else if (strNode.equals("log")) {
String level = xml.getAttributeValue(null, "level");
- LOG.i("CordovaLog", "Found log level %s", level);
+ Log.d(TAG, "The <log> tags is deprecated. Use <preference name=\"loglevel\" value=\"" + level + "\"/> instead.");
if (level != null) {
LOG.setLogLevel(level);
}
@@ -113,7 +113,10 @@ public class Config {
Note: We should probably pass in the classname for the variable splash on splashscreen!
*/
- if(name.equals("splashscreen")) {
+ if (name.equals("loglevel")) {
+ String level = xml.getAttributeValue(null, "value");
+ LOG.setLogLevel(level);
+ } else if (name.equals("splashscreen")) {
String value = xml.getAttributeValue(null, "value");
int resource = 0;
if (value != null)
@@ -123,20 +126,14 @@ public class Config {
resource = action.getResources().getIdentifier(value, "drawable", action.getPackageName());
action.getIntent().putExtra(name, resource);
- LOG.i("CordovaLog", "Found preference for %s=%s", name, value);
- Log.d("CordovaLog", "Found preference for " + name + "=" + value);
}
else if(name.equals("backgroundColor")) {
int value = xml.getAttributeIntValue(null, "value", Color.BLACK);
action.getIntent().putExtra(name, value);
- LOG.i("CordovaLog", "Found preference for %s=%d", name, value);
- Log.d("CordovaLog", "Found preference for " + name + "=" + Integer.toString(value));
}
else if(name.equals("loadUrlTimeoutValue")) {
int value = xml.getAttributeIntValue(null, "value", 20000);
action.getIntent().putExtra(name, value);
- LOG.i("CordovaLog", "Found preference for %s=%d", name, value);
- Log.d("CordovaLog", "Found preference for " + name + "=" + Integer.toString(value));
}
else if(name.equals("keepRunning"))
{
@@ -157,12 +154,9 @@ public class Config {
{
String value = xml.getAttributeValue(null, "value");
action.getIntent().putExtra(name, value);
- LOG.i("CordovaLog", "Found preference for %s=%s", name, value);
- Log.d("CordovaLog", "Found preference for " + name + "=" + value);
}
/*
LOG.i("CordovaLog", "Found preference for %s=%s", name, value);
- Log.d("CordovaLog", "Found preference for " + name + "=" + value);
*/
}
else if (strNode.equals("content")) {