Java Code Examples for timber.log.Timber#wtf()
The following examples show how to use
timber.log.Timber#wtf() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AirMapMapView.java From AirMapSDK-Android with Apache License 2.0 | 5 votes |
public void setTemporalFilter(TemporalFilter temporalFilter){ if(isMapLoaded){ new Handler().postDelayed(new Runnable() { @Override public void run() { mapStyleController.setTemporalFilter(temporalFilter); setMapDataController(new MapDataController(AirMapMapView.this, mapDataController.getConfiguration(), temporalFilter)); } }, 1000); } else { Timber.wtf("Should not be calling setTemporalFilter before map is loaded"); throw new RuntimeException("please call setTemporalFilter after onMapLoaded callback"); } }
Example 2
Source File: DatabaseManager.java From Easy_xkcd with Apache License 2.0 | 5 votes |
/** * Adds or removes a favorite to realm and sharedPreferences * @param fav the comic number of the fac to be modified * @param isFav if the comic has been added or removed from favorites */ public void setFavorite(int fav, boolean isFav) { //Save to realm realm.beginTransaction(); RealmComic comic = realm.where(RealmComic.class).equalTo("comicNumber", fav).findFirst(); if (comic != null) { comic.setFavorite(isFav); realm.copyToRealmOrUpdate(comic); } else { Timber.wtf("Favorited comic %d is not in Realm database!", fav); } realm.commitTransaction(); }
Example 3
Source File: DatabaseManager.java From Easy_xkcd with Apache License 2.0 | 5 votes |
/** * Sets a comic read or unread * @param number the comic number * @param isRead if the comic is read or unread */ public void setRead(int number, boolean isRead) { realm.beginTransaction(); RealmComic comic = realm.where(RealmComic.class).equalTo("comicNumber", number).findFirst(); if (comic != null) { comic.setRead(isRead); realm.copyToRealmOrUpdate(comic); } else { Timber.wtf("Read Comic %d is not in Realm database!", number); } realm.commitTransaction(); }
Example 4
Source File: MainActivity.java From DebugDrawer with Apache License 2.0 | 5 votes |
private void showDummyLog() { Timber.d("Debug"); Timber.e("Error"); Timber.w("Warning"); Timber.i("Info"); Timber.v("Verbose"); Timber.wtf("WTF"); }
Example 5
Source File: DebugViewActivity.java From DebugDrawer with Apache License 2.0 | 5 votes |
private void showDummyLog() { Timber.d("Debug"); Timber.e("Error"); Timber.w("Warning"); Timber.i("Info"); Timber.v("Verbose"); Timber.wtf("WTF"); }
Example 6
Source File: DemoActivity.java From debugdrawer with Apache License 2.0 | 5 votes |
public void onClick1(View v){ Timber.d("verbose"); Timber.i("info"); Timber.d("debug"); Timber.w("warning"); Timber.e("error"); Timber.wtf("wtf"); }
Example 7
Source File: AirMapAdvisory.java From AirMapSDK-Android with Apache License 2.0 | 4 votes |
@Override public AirMapAdvisory constructFromJson(JSONObject json) { if (json != null) { setId(optString(json, "id")); setName(optString(json, "name")); setOrganizationId(optString(json, "organization_id")); setType(MappingService.AirMapAirspaceType.fromString(optString(json, "type"))); setCountry(optString(json, "country")); setDistance(json.optInt("distance")); setCity(optString(json, "city")); setState(optString(json, "state")); setColor(AirMapColor.fromString(optString(json, "color"))); setGeometryString(optString(json, "geometry")); double lat = json.optDouble("latitude"); double lng = json.optDouble("longitude"); if (lat != Double.NaN && lng != Double.NaN) { setCoordinate(new Coordinate(lat, lng)); } String lastUpdated = optString(json, "last_updated"); setLastUpdated(getDateFromIso8601String(lastUpdated)); if (json.has("requirements")) { setRequirements(new AirMapStatusRequirement(json.optJSONObject("requirements"))); } if (type != null) { JSONObject properties = json.optJSONObject("properties"); // set generic properties (url, description, etc) setOptionalProperties(new AirMapOptionalProperties(properties)); // set type specific properties switch (type) { case Airport: { setAirportProperties(new AirMapAirportProperties(properties)); break; } case Park: { setParkProperties(new AirMapParkProperties(properties)); break; } case SpecialUse: { setSpecialUseProperties(new AirMapSpecialUseProperties(properties)); break; } case PowerPlant: { setPowerPlantProperties(new AirMapPowerPlantProperties(properties)); break; } case ControlledAirspace: { setControlledAirspaceProperties(new AirMapControlledAirspaceProperties(properties)); break; } case School: { setSchoolProperties(new AirMapSchoolProperties(properties)); break; } case TFR: { setTfrProperties(new AirMapTfrProperties(properties)); break; } case Wildfires: case Fires: { setWildfireProperties(new AirMapWildfireProperties(properties)); break; } case Heliport: { setHeliportProperties(new AirMapHeliportProperties(properties)); break; } case Emergencies: { setEmergencyProperties(new AirMapEmergencyProperties(properties)); break; } case Notam: { setNotamProperties(new AirMapNotamProperties(properties)); break; } case Notification: { setNotificationProperties(new AirMapNotificationProperties(properties)); break; } } } if(!json.isNull("schedule")){ Timber.wtf("hey a schedule: " + json.optString("name")); List<Timesheet> timesheetList = new ArrayList<>(); JSONArray timeSheetJson = json.optJSONArray("schedule"); for(int i = 0; timeSheetJson != null && i < timeSheetJson.length(); i++){ timesheetList.add(new Timesheet(timeSheetJson.optJSONObject(i))); } setSchedule(timesheetList); Timber.wtf(this.getSchedule().toString()); } } return this; }
Example 8
Source File: ExpandableAdvisoriesAdapter.java From AirMapSDK-Android with Apache License 2.0 | 4 votes |
@Override public void setData(@Nullable LinkedHashMap<Pair<MappingService.AirMapAirspaceType, AirMapColor>, List<AirMapAdvisory>> dataMap) { Timber.wtf("Should not be calling setData in ExpandableAdvisoriesAdapter"); throw new RuntimeException("please call setDataUnseparated instead"); }
Example 9
Source File: Log.java From go-bees with GNU General Public License v3.0 | 4 votes |
/** * Log an assert message with optional format args. */ public static void wtf(String message, Object... args) { Timber.wtf(message, args); }
Example 10
Source File: Log.java From go-bees with GNU General Public License v3.0 | 4 votes |
/** * Log an assert exception and a message with optional format args. */ public static void wtf(Throwable t, String message, Object... args) { Timber.wtf(t, message, args); }
Example 11
Source File: Log.java From go-bees with GNU General Public License v3.0 | 4 votes |
/** * Log an assert exception. */ public static void wtf(Throwable t) { Timber.wtf(t); }
Example 12
Source File: RealmComic.java From Easy_xkcd with Apache License 2.0 | 4 votes |
public static RealmComic buildFromJson(Realm realm, int comicNumber, JSONObject json, Context context) { RealmComic realmComic = new RealmComic(); String title = "", altText = "", url = "", transcript = ""; if (comicNumber == 404) { title = "404"; altText = "404"; url = "https://i.imgur.com/p0eKxKs.png"; } else if (json.length() != 0) { try { title = new String(json.getString("title").getBytes(UTF_8)); url = json.getString("img"); if (!isLargeComic(comicNumber, context) && !isInteractiveComic(comicNumber, context)) { url = getDoubleResolutionUrl(url, comicNumber); } if (isLargeComic(comicNumber, context)) { url = context.getResources(). getStringArray(R.array.large_comics_urls)[Arrays.binarySearch(context.getResources().getIntArray(R.array.large_comics), comicNumber)]; } altText = new String(json.getString("alt").getBytes(UTF_8)); transcript = json.getString("transcript"); // some image and title fixes switch (comicNumber) { } } catch (JSONException e) { Timber.wtf(e); } } else { Timber.wtf("json is empty but comic number is not 404!"); } realmComic.setComicNumber(comicNumber); realmComic.setTitle(title); realmComic.setAltText(altText); realmComic.setUrl(url); realmComic.setTranscript(transcript); return realmComic; }