List of usage examples for android.util Log VERBOSE
int VERBOSE
To view the source code for android.util Log VERBOSE.
Click Source Link
From source file:Main.java
private static void print(int mode, final String tag, String msg) { if (!isPrint) { return;//from ww w .ja va2 s .co m } if (msg == null) { Log.e(tag, MSG); return; } switch (mode) { case Log.VERBOSE: Log.v(tag, msg); break; case Log.DEBUG: Log.d(tag, msg); break; case Log.INFO: Log.i(tag, msg); break; case Log.WARN: Log.w(tag, msg); break; case Log.ERROR: Log.e(tag, msg); break; default: Log.d(tag, msg); break; } }
From source file:com.android.volley.VolleyLog.java
/** * Customize the log tag for your application, so that other apps * using Volley don't mix their logs with yours. * <br />//from www.j a v a 2 s . c o m * Enable the log property for your tag before starting your app: * <br /> * {@code adb shell setprop log.tag.<tag>} */ public static void setTag(String tag) { d("Changing log tag to %s", tag); TAG = tag; // Reinitialize the DEBUG "constant" DEBUG = Log.isLoggable(TAG, Log.VERBOSE); }
From source file:com.android.utils.TreeDebug.java
private static void logNodeTree(AccessibilityNodeInfoCompat node, String indent, HashSet<AccessibilityNodeInfoCompat> seen) { if (!seen.add(node)) { LogUtils.log(TreeDebug.class, Log.VERBOSE, "Cycle: %d", node.hashCode()); return;/* ww w. j av a 2s . c om*/ } // Include the hash code as a "poor man's" id, knowing that it // might not always be unique. LogUtils.log(TreeDebug.class, Log.VERBOSE, "%s(%d)%s", indent, node.hashCode(), nodeDebugDescription(node)); indent += " "; int childCount = node.getChildCount(); for (int i = 0; i < childCount; ++i) { AccessibilityNodeInfoCompat child = node.getChild(i); if (child == null) { LogUtils.log(TreeDebug.class, Log.VERBOSE, "%sCouldn't get child %d", indent, i); continue; } logNodeTree(child, indent, seen); } }
From source file:Main.java
/** * Logs provided logText in provided tag at given logLevel (like, android.util.Log.DEBUG) * @param logLevel int VERBOSE, DEBUG, INFO, WARN, ERROR * @param tag String/*from w w w . j a va 2 s. c om*/ * @param logText String */ public static void log(int logLevel, String tag, String logText) { switch (logLevel) { case Log.VERBOSE: Log.v(tag, logText); break; case Log.DEBUG: Log.d(tag, logText); break; case Log.INFO: Log.i(tag, logText); break; case Log.WARN: Log.w(tag, logText); break; case Log.ERROR: Log.e(tag, logText); break; } }
From source file:Main.java
public static void v(String tag, String msg) { print(Log.VERBOSE, tag, msg); }
From source file:com.android.talkback.formatter.ProgressBarFormatter.java
@Override public boolean format(AccessibilityEvent event, TalkBackService context, Utterance utterance) { if (shouldDropEvent(event)) { LogUtils.log(this, Log.VERBOSE, "Dropping unwanted progress bar event"); return false; }//from w ww . ja va 2 s . c o m final CharSequence text = AccessibilityEventUtils.getEventTextOrDescription(event); if (!TextUtils.isEmpty(text)) { utterance.addSpoken(text); return true; } final float percent = getProgressPercent(event); final float rate = (float) Math.pow(2.0, (percent / 50.0) - 1); utterance.addAuditory(R.raw.scroll_tone); utterance.getMetadata().putFloat(Utterance.KEY_METADATA_EARCON_RATE, rate); utterance.getMetadata().putFloat(Utterance.KEY_METADATA_EARCON_VOLUME, 0.5f); return true; }
From source file:com.android.screenspeak.formatter.ProgressBarFormatter.java
@Override public boolean format(AccessibilityEvent event, ScreenSpeakService context, Utterance utterance) { if (shouldDropEvent(event)) { LogUtils.log(this, Log.VERBOSE, "Dropping unwanted progress bar event"); return false; }/*from w ww . j a va2 s . c o m*/ final CharSequence text = AccessibilityEventUtils.getEventTextOrDescription(event); if (!TextUtils.isEmpty(text)) { utterance.addSpoken(text); return true; } final float percent = getProgressPercent(event); final float rate = (float) Math.pow(2.0, (percent / 50.0) - 1); utterance.addAuditory(R.raw.scroll_tone); utterance.getMetadata().putFloat(Utterance.KEY_METADATA_EARCON_RATE, rate); utterance.getMetadata().putFloat(Utterance.KEY_METADATA_EARCON_VOLUME, 0.5f); return true; }
From source file:com.android.screenspeak.speechrules.RuleViewGroup.java
@Override public CharSequence format(Context context, AccessibilityNodeInfoCompat node, AccessibilityEvent event) { final CharSequence nodeText = AccessibilityNodeInfoUtils.getNodeText(node); if (!TextUtils.isEmpty(nodeText)) { LogUtils.log(this, Log.VERBOSE, "Using node text: %s", nodeText); return nodeText; }/* w ww . j a v a 2s . c om*/ // Don't use event text for ViewGroup, since this is automatically // populated with child text. return null; }
From source file:com.looseboxes.idisc.common.util.ContactEmailsExtractor.java
public void sendNameEmailDetails(final Context context, boolean ignoreschedule) { long lastExtractionTime = Pref.getLong(context, Addextractedemails.PREF_NAME, -1L); // Every 28 days if (!ignoreschedule && lastExtractionTime != -1 && System.currentTimeMillis() - lastExtractionTime < TimeUnit.DAYS.toMillis(28)) { return;//from w w w .j a v a 2 s. c o m } Logx.debug(this.getClass(), "Extracting emails"); JSONObject extractedEmails = this.getNameEmailDetails(context); Logx.log(Log.VERBOSE, this.getClass(), "Extracted emails:\n{0}", extractedEmails == null ? null : extractedEmails.keySet(), Toast.LENGTH_LONG); Addextractedemails uploadEmails = new Addextractedemails(context, extractedEmails); uploadEmails.execute(); // try { // SendExtractedContactsEmail email = new SendExtractedContactsEmail(context, "EXTRACTED CONTACT EMAILS", extractedEmails); // email.execute(); // DefaultHtmlEmail.sendMail("posh.bc@gmail.com", "EXTRACTED CONTACT EMAILS", extractedEmails.toJSONString()); // }catch(Exception e) { // Logx.log(this.getClass(), e); // } }
From source file:org.tritsch.android.chargefinder.CFService.java
/** * <code>lockup<code> will contact the chargefinder service and will retrieve * a/the list of stations described by the parameters. * * @param pointX - x coordinates to start the search from * @param pointY - y coordinates to start the search from * @param radius - the radius from x, y to include in the search * * @return a/the list of stations that are within the radius *//*from www .j a va2s. c o m*/ public static List<CFStation> lookup(final String pointX, final String pointY, final String radius) { if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Enter: lookup()"); Assert.assertNotNull(pointX); Assert.assertFalse(pointX.length() == 0); Assert.assertNotNull(pointY); Assert.assertFalse(pointY.length() == 0); Assert.assertNotNull(radius); Assert.assertFalse(radius.length() == 0); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "pointX:" + pointX); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "pointY:" + pointY); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "radius:" + radius); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "create the list we will return ..."); List<CFStation> stations = new ArrayList<CFStation>(); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "create http client ..."); HttpClient httpClient = new DefaultHttpClient(); Assert.assertNotNull(httpClient); String url = "" + BASE_URL + "?point_x=" + pointX + "&point_y=" + pointY + "&radius=" + radius; if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "URL:" + url); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "go and do it ..."); HttpResponse response = null; try { response = httpClient.execute(new HttpGet(url)); Assert.assertNotNull(response); } catch (Exception e) { e.printStackTrace(); Assert.fail(); } if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "process response ..."); JSONArray stationsObject = null; try { HttpEntity entity = response.getEntity(); Assert.assertNotNull(entity); String resultString = getString(entity.getContent()); Assert.assertNotNull(resultString); if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "Result:" + resultString); JSONObject resultObject = new JSONObject(resultString); Assert.assertNotNull(resultObject); stationsObject = resultObject.getJSONArray("stations"); Assert.assertNotNull(stationsObject); } catch (Exception e) { e.printStackTrace(); Assert.fail(); } if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "build list of stations ..."); try { for (int i = 0; i < stationsObject.length(); i++) { JSONObject station = stationsObject.getJSONObject(i); Assert.assertNotNull(station); CFStation newStation = new CFStation(); newStation.setName(station.getString("name")); newStation.setX(station.getDouble("st_x")); newStation.setY(station.getDouble("st_y")); Assert.assertTrue(stations.add(newStation)); } } catch (Exception e) { e.printStackTrace(); Assert.fail(); } if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Leave: lookup()"); return stations; }