Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
perf: 移除不必要的 api
Browse files Browse the repository at this point in the history
  • Loading branch information
painld6 committed Aug 18, 2021
1 parent 010b19c commit 3f4ef1a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@ class DefaultLogCat : ILogger {
Log.w(tag, msg)
}

override fun error(tag: String, msg: String) {
Log.e(tag, msg)
}

override fun error(tag: String, error: Throwable) {
Log.e(tag, "", error)
}

override fun error(tag: String, msg: String, error: Throwable) {
override fun error(tag: String, msg: String?, error: Throwable?) {
Log.e(tag, msg, error)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ interface ILogger {
fun info(tag: String, msg: String)
fun debug(tag: String, msg: String)
fun warn(tag: String, msg: String)
fun error(tag: String, msg: String)
fun error(tag: String, error: Throwable)
fun error(tag: String, msg: String, error: Throwable)
fun error(tag: String, msg: String?, error: Throwable?)
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ internal object LogUtils {
if (!SVGALogger.isLogEnabled()) {
return
}
SVGALogger.getSVGALogger()?.error(tag, msg)
SVGALogger.getSVGALogger()?.error(tag, msg, null)
}

fun error(tag: String = TAG, msg: String, error: Throwable) {
fun error(tag: String, error: Throwable) {
if (!SVGALogger.isLogEnabled()) {
return
}
SVGALogger.getSVGALogger()?.error(tag, msg, error)
SVGALogger.getSVGALogger()?.error(tag, error.message, error)
}

fun error(tag: String, error: Throwable) {
fun error(tag: String = TAG, msg: String, error: Throwable) {
if (!SVGALogger.isLogEnabled()) {
return
}
SVGALogger.getSVGALogger()?.error(tag, error)
SVGALogger.getSVGALogger()?.error(tag, msg, error)
}
}

0 comments on commit 3f4ef1a

Please sign in to comment.