public static bool belowThreshold(GoogleAnalyticsV3.DebugMode userLogLevel, GoogleAnalyticsV3.DebugMode comparelogLevel) { if (comparelogLevel == userLogLevel) { return(true); } else if (userLogLevel == GoogleAnalyticsV3.DebugMode.ERROR) { return(false); } else if (userLogLevel == GoogleAnalyticsV3.DebugMode.VERBOSE) { return(true); } else if (userLogLevel == GoogleAnalyticsV3.DebugMode.WARNING && (comparelogLevel == GoogleAnalyticsV3.DebugMode.INFO || comparelogLevel == GoogleAnalyticsV3.DebugMode.VERBOSE)) { return(false); } else if (userLogLevel == GoogleAnalyticsV3.DebugMode.INFO && (comparelogLevel == GoogleAnalyticsV3.DebugMode.VERBOSE)) { return(false); } return(true); }
private void SetLogLevel(GoogleAnalyticsV3.DebugMode logLevel) { switch (logLevel) { case GoogleAnalyticsV3.DebugMode.ERROR: handler._setLogLevel(1); break; case GoogleAnalyticsV3.DebugMode.VERBOSE: handler._setLogLevel(4); break; case GoogleAnalyticsV3.DebugMode.INFO: handler._setLogLevel(3); break; default: handler._setLogLevel(2); break; } }
private void SetLogLevel(GoogleAnalyticsV3.DebugMode logLevel) { using (logger = googleAnalyticsSingleton. Call <AndroidJavaObject>("getLogger")) using (AndroidJavaClass log = new AndroidJavaClass( "com.google.analytics.tracking.android.Logger$LogLevel")) { switch (logLevel) { case GoogleAnalyticsV3.DebugMode.ERROR: using (AndroidJavaObject level = log.GetStatic <AndroidJavaObject>("ERROR")){ logger.Call("setLogLevel", level); } break; case GoogleAnalyticsV3.DebugMode.VERBOSE: using (AndroidJavaObject level = log.GetStatic <AndroidJavaObject>("VERBOSE")){ logger.Call("setLogLevel", level); } break; case GoogleAnalyticsV3.DebugMode.INFO: using (AndroidJavaObject level = log.GetStatic <AndroidJavaObject>("INFO")){ logger.Call("setLogLevel", level); } break; default: using (AndroidJavaObject level = log.GetStatic <AndroidJavaObject>("WARNING")){ logger.Call("setLogLevel", level); } break; } } }
public void SetLogLevelValue(GoogleAnalyticsV3.DebugMode logLevel) { this.logLevel = logLevel; }