Java Code Examples for timber.log.Timber#plant()
The following examples show how to use
timber.log.Timber#plant() .
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: App.java From backstack with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); if (BuildConfig.DEBUG){ Timber.plant(new Timber.DebugTree(){ @Override protected String createStackElementTag(StackTraceElement element) { return super.createStackElementTag(element) + ":" + element.getLineNumber(); } }); } if (BuildConfig.DEBUG) { if (LeakCanary.isInAnalyzerProcess(this)) { // This process is dedicated to LeakCanary for heap analysis. // You should not init your app in this process. return; } refWatcher = LeakCanary.install(this); } }
Example 2
Source File: DNSChangerApp.java From star-dns-changer with MIT License | 6 votes |
@Override public void onCreate() { super.onCreate(); //di applicationComponent = DaggerApplicationComponent.builder() .applicationModule(new ApplicationModule(this)) .build(); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } else { //TODO: Add your release log tree } }
Example 3
Source File: U2020App.java From u2020-mvp with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); AndroidThreeTen.init(this); LeakCanary.install(this); if (BuildConfig.DEBUG) { Timber.plant(new DebugTree()); } else { // TODO Crashlytics.start(this); // TODO Timber.plant(new CrashlyticsTree()); } buildComponentAndInject(); registerActivityLifecycleCallbacks(activityHierarchyServer); }
Example 4
Source File: SaudeApp.java From Saude-no-Mapa with MIT License | 6 votes |
@Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); Timber.plant(new Timber.DebugTree()); RealmConfiguration configuration = new RealmConfiguration.Builder(this) .deleteRealmIfMigrationNeeded() .build(); Realm.setDefaultConfiguration(configuration); FacebookSdk.sdkInitialize(getApplicationContext()); Timber.i("Signature " + FacebookSdk.getApplicationSignature(getApplicationContext())); }
Example 5
Source File: Application.java From android-mvp-starter with MIT License | 6 votes |
@Override public void onCreate(){ super.onCreate(); //di component = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build(); //Crashlytics CrashlyticsCore core = new CrashlyticsCore.Builder() .disabled(BuildConfig.DEBUG) .build(); Fabric.with(this, new Crashlytics.Builder().core(core).build()); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } else { Timber.plant(new CrashReportTree()); } }
Example 6
Source File: KaliumApplication.java From natrium-android-wallet with BSD 2-Clause "Simplified" License | 6 votes |
public void onCreate() { super.onCreate(); // initialize Realm database Realm.init(this); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } // create new instance of the application component (DI) mApplicationComponent = DaggerApplicationComponent .builder() .applicationModule(new ApplicationModule(this)) .build(); // initialize vault Vault.initializeVault(this); generateEncryptionKey(); // initialize fingerprint Reprint.initialize(this); AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); }
Example 7
Source File: MyApp.java From MaterialWpp with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } }
Example 8
Source File: Dagger2Application.java From mcumgr-android with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); // The app injector makes sure that all activities and fragments that implement Injectable // are injected in onCreate(...) or onActivityCreated(...) AppInjector.init(this); // Plant a Timber DebugTree to collect logs from sample app and McuManager Timber.plant(new Timber.DebugTree()); }
Example 9
Source File: AndroidApplication.java From clean-architecture with MIT License | 5 votes |
@Override public void onCreate() { UniquePointOfInstanciation.setContext(getApplicationContext()); super.onCreate(); // initiate Timber Timber.plant(new DebugTree()); }
Example 10
Source File: EasyXkcdApp.java From Easy_xkcd with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } else { Timber.plant(new NoDebugTree()); } }
Example 11
Source File: App.java From scoop with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); Stetho.initializeWithDefaults(this); Timber.plant(new Timber.DebugTree()); Timber.d("onCreate"); applicationGraph = ObjectGraph.create(new AppModule(this)); }
Example 12
Source File: SpectreApplication.java From quill with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics(), new Answers()); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } else { Timber.plant(new CrashReportingTree()); } Crashlytics.log(Log.DEBUG, TAG, "APP LAUNCHED"); BusProvider.getBus().register(this); sInstance = this; RxJavaPlugins.setErrorHandler(this::uncaughtRxException); setupMetadataRealm(); setupFonts(); initOkHttpClient(); initPicasso(); NetworkService networkService = new NetworkService(); mHACKListener = networkService; networkService.start(mOkHttpClient); mAnalyticsService = new AnalyticsService(BusProvider.getBus()); mAnalyticsService.start(); }
Example 13
Source File: HostsEditorApplication.java From hosts-editor-android with Apache License 2.0 | 5 votes |
private void initLogger() { if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } else { Timber.plant(new ReleaseTree()); } }
Example 14
Source File: FontsterApp.java From fontster with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); Injector.initialize(this); Fabric.with(this, new Crashlytics()); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } }
Example 15
Source File: TodoApp.java From sqlbrite with Apache License 2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } mainComponent = DaggerTodoComponent.builder().todoModule(new TodoModule(this)).build(); }
Example 16
Source File: MainActivity.java From RxShell with Apache License 2.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { Timber.plant(new Timber.DebugTree()); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); execute.setVisibility(View.INVISIBLE); }
Example 17
Source File: AppLifecycleCallbacks.java From photosearcher with Apache License 2.0 | 4 votes |
protected void setupLogger() { Timber.plant(new CrashReportingTree()); }
Example 18
Source File: TApplication.java From TitanjumNote with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); Timber.plant(new Timber.DebugTree()); }
Example 19
Source File: AppLogger.java From android-mvp-interactor-architecture with Apache License 2.0 | 4 votes |
public static void init() { if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } }
Example 20
Source File: AppLogger.java From android-mvvm-architecture with Apache License 2.0 | 4 votes |
public static void init() { if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } }