mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-21 07:28:18 -05:00
Switch the logging framework
This commit is contained in:
parent
fdec1e3ed8
commit
3bb9d61ff9
@ -77,6 +77,7 @@ dependencies {
|
||||
compile 'com.android.support:recyclerview-v7:+'
|
||||
compile 'com.android.support:cardview-v7:+'
|
||||
compile 'org.apache.commons:commons-lang3:+'
|
||||
compile 'com.orhanobut:logger:+'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
androidTestCompile 'com.jayway.awaitility:awaitility:+'
|
||||
|
@ -1,5 +1,8 @@
|
||||
package org.bspeice.minimalbible;
|
||||
|
||||
import com.orhanobut.logger.LogLevel;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
/**
|
||||
* Create a MinimalBible application that we can extend from the main release
|
||||
* Currently it's not doing much, but would allow for shenanigans during testing in the future
|
||||
@ -15,6 +18,9 @@ public class MinimalBibleDebug extends MinimalBible implements Injector {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Logger.init("MinimalBible")
|
||||
.setLogLevel(LogLevel.FULL);
|
||||
Logger.d("Beginning application run...");
|
||||
// ACRA.init(this);
|
||||
}
|
||||
}
|
@ -2,7 +2,9 @@ package org.bspeice.minimalbible;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.orhanobut.logger.LogLevel;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import org.crosswire.jsword.book.sword.SwordBookPath;
|
||||
|
||||
@ -24,6 +26,7 @@ public class MinimalBible extends Application implements Injector {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Logger.init().setLogLevel(LogLevel.NONE);
|
||||
buildObjGraph();
|
||||
setJswordHome();
|
||||
}
|
||||
@ -49,10 +52,10 @@ public class MinimalBible extends Application implements Injector {
|
||||
// We need to set the download directory for jSword to stick with
|
||||
// Android.
|
||||
String home = this.getFilesDir().toString();
|
||||
Log.d(TAG, "Setting jsword.home to: " + home);
|
||||
Logger.d(TAG, "Setting jsword.home to: " + home);
|
||||
System.setProperty("jsword.home", home);
|
||||
System.setProperty("sword.home", home);
|
||||
SwordBookPath.setDownloadDir(new File(home));
|
||||
Log.d(TAG, "Sword download path: " + SwordBookPath.getSwordDownloadDir());
|
||||
Logger.d(TAG, "Sword download path: " + SwordBookPath.getSwordDownloadDir());
|
||||
}
|
||||
}
|
@ -2,8 +2,8 @@ package org.bspeice.minimalbible.activity.viewer
|
||||
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.util.Log
|
||||
import android.widget.TextView
|
||||
import com.orhanobut.logger.Logger
|
||||
import org.bspeice.minimalbible.service.format.osisparser.OsisParser
|
||||
import org.crosswire.jsword.book.Book
|
||||
import org.crosswire.jsword.book.getVersification
|
||||
@ -22,7 +22,7 @@ class PassageView(val v: TextView, val b: Book)
|
||||
}
|
||||
|
||||
fun bind(info: BookAdapter.ChapterInfo) {
|
||||
Log.d("PassageView", "Binding chapter ${info.chapter}")
|
||||
Logger.d("PassageView", "Binding chapter ${info.chapter}")
|
||||
v setText getAllVerses(info.vStart..info.vEnd, info)
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package org.bspeice.minimalbible.service.format.osisparser.handler
|
||||
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.util.Log
|
||||
import com.orhanobut.logger.Logger
|
||||
import org.bspeice.minimalbible.service.format.osisparser.VerseContent
|
||||
|
||||
/**
|
||||
@ -9,6 +9,6 @@ import org.bspeice.minimalbible.service.format.osisparser.VerseContent
|
||||
*/
|
||||
class UnknownHandler(val tagName: String) : TagHandler {
|
||||
override fun render(builder: SpannableStringBuilder, info: VerseContent, chars: String) {
|
||||
Log.d("UnknownHandler", "Unknown tag $tagName received text: $chars")
|
||||
Logger.w("Unknown tag '$tagName' received text: '$chars'")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user