Permalink
Browse files

Android: Provide common convenient way to print messages to rhodes lo…

…g for extensions
  • Loading branch information...
lexis-t committed Apr 11, 2012
1 parent 32f6514 commit ecdc3065cdf7d403e198f77efc8196e01c273e26
Showing with 41 additions and 1 deletion.
  1. +41 −1 platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManager.java
@@ -1,7 +1,8 @@
package com.rhomobile.rhodes.extmanager;
-public class RhoExtManager extends Object {
+import com.rhomobile.rhodes.Logger;
+public class RhoExtManager extends Object {
private static RhoExtManagerImpl ourRhoExtManager = null;
public static RhoExtManagerImpl getImplementationInstance() {
@@ -11,8 +12,47 @@ public static RhoExtManagerImpl getImplementationInstance() {
return ourRhoExtManager;
}
+ /**
+ * @return IRhoExtManager instance
+ */
public static IRhoExtManager getInstance() {
return getImplementationInstance();
}
+ /**
+ * Convenient way to print trace message to rhodes log
+ * @param tag - log source
+ * @param msg - log message
+ */
+ public static void logT(String tag, String msg) {
+ Logger.T(tag, msg);
+ }
+
+ /**
+ * Convenient way to print info message to rhodes log
+ * @param tag - log source
+ * @param msg - log message
+ */
+ public static void logI(String tag, String msg) {
+ Logger.I(tag, msg);
+ }
+
+ /**
+ * Convenient way to print warning message to rhodes log
+ * @param tag - log source
+ * @param msg - log message
+ */
+ public static void logW(String tag, String msg) {
+ Logger.W(tag, msg);
+ }
+
+ /**
+ * Convenient way to print error message to rhodes log
+ * @param tag - log source
+ * @param msg - log message
+ */
+ public static void logE(String tag, String msg) {
+ Logger.E(tag, msg);
+ }
+
}

0 comments on commit ecdc306

Please sign in to comment.