重构代码--34 在shim中添加接口,获取日志器,getLogger函数,合约通过此日志器来输出日志。

This commit is contained in:
wuwei1972 2019-04-22 13:54:54 +08:00
parent 39ea2abe18
commit 447cdb3e71

View File

@ -35,6 +35,7 @@ import rep.storage.ImpDataAccess
import rep.crypto.cert.SignTool
import _root_.com.google.protobuf.ByteString
import rep.log.RepLogger
import org.slf4j.Logger;
/** Shim伴生对象
* @author c4w
@ -121,4 +122,9 @@ class Shim(system: ActorSystem, cName: String) {
def bNodeCreditCode(credit_code: String) : Boolean ={
SignTool.isNode4Credit(credit_code)
}
//通过该接口获取日志器合约使用此日志器输出业务日志
def getLogger:Logger={
RepLogger.Business_Logger
}
}