diff --git a/library/src/main/java/com/opensource/svgaplayer/utils/log/DefaultLogCat.kt b/library/src/main/java/com/opensource/svgaplayer/utils/log/DefaultLogCat.kt index fee1a24e..33200b0e 100644 --- a/library/src/main/java/com/opensource/svgaplayer/utils/log/DefaultLogCat.kt +++ b/library/src/main/java/com/opensource/svgaplayer/utils/log/DefaultLogCat.kt @@ -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) } } \ No newline at end of file diff --git a/library/src/main/java/com/opensource/svgaplayer/utils/log/ILogger.kt b/library/src/main/java/com/opensource/svgaplayer/utils/log/ILogger.kt index bb190330..ad935104 100644 --- a/library/src/main/java/com/opensource/svgaplayer/utils/log/ILogger.kt +++ b/library/src/main/java/com/opensource/svgaplayer/utils/log/ILogger.kt @@ -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?) } \ No newline at end of file diff --git a/library/src/main/java/com/opensource/svgaplayer/utils/log/LogUtils.kt b/library/src/main/java/com/opensource/svgaplayer/utils/log/LogUtils.kt index 4f9cfdb1..60c67f9c 100644 --- a/library/src/main/java/com/opensource/svgaplayer/utils/log/LogUtils.kt +++ b/library/src/main/java/com/opensource/svgaplayer/utils/log/LogUtils.kt @@ -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) } } \ No newline at end of file