pull/1171/head
gedoor 3 years ago
parent 3906e1a6df
commit f411d8af0f
  1. 20
      app/src/main/java/io/legado/app/model/Debug.kt

@ -33,16 +33,18 @@ object Debug {
showTime: Boolean = true,
state: Int = 1
) {
if (debugSource != sourceUrl || callback == null || !print) return
var printMsg = msg ?: ""
if (isHtml) {
printMsg = HtmlFormatter.format(msg)
}
if (showTime) {
printMsg =
"${DEBUG_TIME_FORMAT.format(Date(System.currentTimeMillis() - startTime))} $printMsg"
callback?.let {
if (debugSource != sourceUrl || !print) return
var printMsg = msg ?: ""
if (isHtml) {
printMsg = HtmlFormatter.format(msg)
}
if (showTime) {
val time = DEBUG_TIME_FORMAT.format(Date(System.currentTimeMillis() - startTime))
printMsg = "$time $printMsg"
}
it.printLog(state, printMsg)
}
callback?.printLog(state, printMsg)
}
@Synchronized

Loading…
Cancel
Save