This commit is contained in:
zhongchao
2022-03-14 14:11:29 +08:00
parent 3ffcb4bd27
commit d35700cb08
32 changed files with 332 additions and 1874 deletions

View File

@@ -1,8 +1,9 @@
package com.mogo.eagle.core.function.chat.facade.aop
import android.os.Looper
import android.util.Log
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.deva.scene.SceneConstant.Companion.M_CHAT
import com.mogo.eagle.core.function.call.logger.CallerLogger
import org.aspectj.lang.ProceedingJoinPoint
import org.aspectj.lang.reflect.CodeSignature
import org.aspectj.lang.reflect.MethodSignature
@@ -37,7 +38,7 @@ open class BaseAspectj {
if (Looper.myLooper() != Looper.getMainLooper()) {
builder.append("[Thread:\"").append(Thread.currentThread().name).append("\"]")
}
Log.i(asTag(cls), builder.toString())
CallerLogger.d(M_CHAT + asTag(cls), builder.toString())
}
fun exitMethod(joinPoint: ProceedingJoinPoint, result: Any?, lengthMill: Long) {
@@ -50,10 +51,10 @@ open class BaseAspectj {
&& signature.returnType != Void.TYPE
val builder = StringBuilder("\u21E0 ")
.append(methodName)
.append("[")
.append(lengthMill)
.append("ms]")
.append(methodName)
.append("[")
.append(lengthMill)
.append("ms]")
if (hasReturnType) {
builder.append(" = ")
@@ -61,7 +62,7 @@ open class BaseAspectj {
result.toString()
})
}
Log.i(asTag(cls), builder.toString())
CallerLogger.d(M_CHAT + asTag(cls), builder.toString())
}
private fun asTag(cls: Class<*>): String {