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, showTime: Boolean = true,
state: Int = 1 state: Int = 1
) { ) {
if (debugSource != sourceUrl || callback == null || !print) return callback?.let {
var printMsg = msg ?: "" if (debugSource != sourceUrl || !print) return
if (isHtml) { var printMsg = msg ?: ""
printMsg = HtmlFormatter.format(msg) if (isHtml) {
} printMsg = HtmlFormatter.format(msg)
if (showTime) { }
printMsg = if (showTime) {
"${DEBUG_TIME_FORMAT.format(Date(System.currentTimeMillis() - startTime))} $printMsg" val time = DEBUG_TIME_FORMAT.format(Date(System.currentTimeMillis() - startTime))
printMsg = "$time $printMsg"
}
it.printLog(state, printMsg)
} }
callback?.printLog(state, printMsg)
} }
@Synchronized @Synchronized

Loading…
Cancel
Save