Java Code Examples for timber.log.Timber#treeCount()
The following examples show how to use
timber.log.Timber#treeCount() .
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: FitbitGatt.java From bitgatt with Mozilla Public License 2.0 | 6 votes |
private void setup(){ // only add a custom logger if the implementer isn't using Timber, if they are using Timber // let them deal with it, just make sure your variants set BuildConfig.DEBUG correctly if (Timber.treeCount() == 0) { if (BuildConfig.DEBUG) { Timber.plant(new BitgattDebugTree()); } else { Timber.plant(new BitgattReleaseTree()); } } ourInstance.overallGattEventListeners = new CopyOnWriteArrayList<>(); // we will default to one expected device and that it should not looking ourInstance.alwaysConnectedScanner = new AlwaysConnectedScanner(1, false, Looper.getMainLooper()); ourInstance.fitbitGattAsyncOperationThread.start(); ourInstance.fitbitGattAsyncOperationHandler = new Handler(ourInstance.fitbitGattAsyncOperationThread.getLooper()); // we need to make sure that this thread is alive and responsive or our gatt // flow will stop and we won't be able to tell ourInstance.asyncOperationThreadWatchdog = new LooperWatchdog(ourInstance.fitbitGattAsyncOperationThread.getLooper()); }
Example 2
Source File: TimberRaygunLoggerImplementation.java From raygun4android with MIT License | 4 votes |
public static void init() { if (Timber.treeCount() == 0) { Timber.plant(new Timber.DebugTree()); } }
Example 3
Source File: TimberRaygunLoggerImplementation.java From raygun4android with MIT License | 4 votes |
public static void init() { if (Timber.treeCount() == 0) { Timber.plant(new TimberRaygunReleaseTree()); } }