-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from fengzhizi715/dev
Dev
- Loading branch information
Showing
15 changed files
with
132 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
RxCache | ||
=== | ||
|
||
Version 2.1.8 | ||
--- | ||
2023-2-14 | ||
* 第三方库的升级 | ||
* 增加对外暴露的日志接口 | ||
|
||
Version 2.1.7 | ||
--- | ||
2023-1-16 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
core/src/main/kotlin/com/safframework/rxcache/log/LoggerProxy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.safframework.rxcache.log | ||
|
||
/** | ||
* | ||
* @FileName: | ||
* com.safframework.rxcache.log.LoggerProxy | ||
* @author: Tony Shen | ||
* @date: 2023/2/13 8:00 PM | ||
* @version: V1.0 <描述当前版本功能> | ||
*/ | ||
interface Logger { | ||
fun i(msg: String, tag: String? = "rxcache") | ||
fun v(msg: String, tag: String? = "rxcache") | ||
fun d(msg: String, tag: String? = "rxcache") | ||
fun w(msg: String, tag: String? = "rxcache", tr: Throwable?) | ||
fun e(msg: String, tag: String? = "rxcache", tr: Throwable?) | ||
} | ||
|
||
object LoggerProxy { | ||
|
||
private lateinit var mLogger: Logger | ||
|
||
fun initLogger(logger: Logger) { | ||
mLogger = logger | ||
} | ||
|
||
fun getLogger() = mLogger | ||
} | ||
|
||
fun String.logI() = LoggerProxy.getLogger().i(this,"rxcache") | ||
|
||
fun Throwable.logE(msg: String) = LoggerProxy.getLogger().e(msg, "rxcache", this) |
Oops, something went wrong.