當前位置: 首頁>>代碼示例>>Java>>正文


Java Timber.plant方法代碼示例

本文整理匯總了Java中timber.log.Timber.plant方法的典型用法代碼示例。如果您正苦於以下問題:Java Timber.plant方法的具體用法?Java Timber.plant怎麽用?Java Timber.plant使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在timber.log.Timber的用法示例。


在下文中一共展示了Timber.plant方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    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;
        }
        LeakCanary.install(this);
    }

    component = DaggerAppComponent.builder()
            .appModule(new AppModule(this))
            .netModule(new NetModule())
            .repositoryModule(new RepositoryModule())
            .build();

    Timber.plant(new Timber.DebugTree());
}
 
開發者ID:pabloserranof,項目名稱:GuardianReader,代碼行數:21,代碼來源:MyApplication.java

示例2: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    INSTANCE = this;
    super.onCreate();
    appComponent = DaggerApplicationComponent
            .builder()
            .apiModule(new ApiModule())
            .applicationModule(new ApplicationModule(this))
            .ciceroneModule(new CiceroneModule(Cicerone.create()))
            .build();

    if (BuildConfig.DEBUG) { //init Timber
        Timber.plant(new Timber.DebugTree());
    }

}
 
開發者ID:AntonZorin,項目名稱:Mvp-app-sample,代碼行數:17,代碼來源:TemplateApplication.java

示例3: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_test_player);
    ButterKnife.bind(this);
    btDecrypt.setOnClickListener(this);
    btEncrypt.setOnClickListener(this);
    allPlayerTime.setOnClickListener(this);
    startPlay.setOnClickListener(this);
    btEncryplay.setOnClickListener(this);

    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }


    initData();
    initPlayer(deng);


}
 
開發者ID:ChangWeiBa,項目名稱:AesExoPlayer,代碼行數:22,代碼來源:TestPlayerActivity.java

示例4: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    Timber.setAppTag("WearVibrationCenter");

    boolean isDebuggable = (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
    if (!isDebuggable) {
        ExceptionWear.initialize(this);
        Timber.plant(new TimberExceptionWear(this));
    }

    Timber.plant(new Timber.AndroidDebugTree(isDebuggable));

    FileLogger fileLogger = FileLogger.getInstance(this);
    fileLogger.activate();
    Timber.plant(fileLogger);
}
 
開發者ID:matejdro,項目名稱:WearVibrationCenter,代碼行數:19,代碼來源:WearVibrationCenter.java

示例5: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    //Enable timber
    Timber.plant(new ReleaseTree());
}
 
開發者ID:kevalpatel2106,項目名稱:smart-lens,代碼行數:8,代碼來源:MyApplication.java

示例6: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (BuildConfig.DEBUG) Timber.plant(new Timber.DebugTree());
    mApplicationComponent = DaggerApplicationComponent.builder()
            .applicationModule(new ApplicationModule(this))
            .build();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:9,代碼來源:HackerNewsApplication.java

示例7: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
        Timber.tag("BasicCalculator");
    }

    applicationComponent = DaggerApplicationComponent.builder()
            .applicationModule(new ApplicationModule(this))
            .build();
}
 
開發者ID:raulh82vlc,項目名稱:SimpleCalculator,代碼行數:13,代碼來源:BasicCalculatorApp.java

示例8: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (BuildConfig.DEBUG){
        Timber.plant(new Timber.DebugTree());
    }
    mBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);
    setSupportActionBar(mBinding.toolbar);
}
 
開發者ID:harrynp,項目名稱:BakingApp,代碼行數:10,代碼來源:MainActivity.java

示例9: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (BuildConfig.DEBUG) {
        Timber.plant(new AwesomeDebugTree());
    }
    MobileAppInjector.getInstance().init(this);
}
 
開發者ID:leinardi,項目名稱:androidthings-kuman-sm9,代碼行數:9,代碼來源:MobileApp.java

示例10: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override public void onCreate() {
  super.onCreate();

  applicationComponent = DaggerApplicationComponent.builder()
      .applicationModule(new ApplicationModule(this))
      .contextModule(new ContextModule(this))
      .databaseModule(new DatabaseModule())
      .networkModule(new NetworkModule())
      .build();

  applicationComponent.inject(this);

  CalligraphyConfig.initDefault(calligraphyConfig);
  Timber.plant(new Timber.DebugTree());
}
 
開發者ID:nikacotAndroid,項目名稱:Weather-Guru-MVP,代碼行數:16,代碼來源:WeatherGuruApplication.java

示例11: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }
    Timber.i("AstaApp started");
}
 
開發者ID:AStA-HTWG-Konstanz,項目名稱:app-android,代碼行數:10,代碼來源:AstaApp.java

示例12: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (BuildConfig.DEBUG) Timber.plant(new Timber.DebugTree());

    mApplicationComponent = DaggerApplicationComponent.builder()
            .applicationModule(new ApplicationModule(this))
            .build();
}
 
開發者ID:sathishmscict,項目名稱:Pickr,代碼行數:10,代碼來源:PickrApplication.java

示例13: init

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void init() {
    Timber.plant(new Timber.DebugTree(){
        @Override
        protected String createStackElementTag(StackTraceElement element) {
            return super.createStackElementTag(element)+":"+element.getLineNumber();
        }
    });
}
 
開發者ID:iamBedant,項目名稱:InstantAppStarter,代碼行數:10,代碼來源:AppImpl.java

示例14: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override public void onCreate() {
  super.onCreate();

  if (BuildConfig.DEBUG) {
    Timber.plant(new DebugTree());
  } else {
    Timber.plant(new ReleaseTree());
  }
}
 
開發者ID:WassimBenltaief,項目名稱:TodoMvp,代碼行數:10,代碼來源:App.java

示例15: onCreate

import timber.log.Timber; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    Timber.plant(new Timber.DebugTree());
    RealmInitializer.init(this);
}
 
開發者ID:jonashao,項目名稱:Samantha,代碼行數:7,代碼來源:App.java


注:本文中的timber.log.Timber.plant方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。