vm: Separate logger for actors

This commit is contained in:
Łukasz Magiera 2020-07-13 12:29:27 +02:00
parent 896f0c69fc
commit c1048a0353
2 changed files with 5 additions and 4 deletions

View File

@ -582,12 +582,12 @@ func (rt *Runtime) abortIfAlreadyValidated() {
func (rt *Runtime) Log(level vmr.LogLevel, msg string, args ...interface{}) {
switch level {
case vmr.DEBUG:
log.Debugf(msg, args)
actorLog.Debugf(msg, args)
case vmr.INFO:
log.Infof(msg, args)
actorLog.Infof(msg, args)
case vmr.WARN:
log.Warnf(msg, args)
actorLog.Warnf(msg, args)
case vmr.ERROR:
log.Errorf(msg, args)
actorLog.Errorf(msg, args)
}
}

View File

@ -35,6 +35,7 @@ import (
)
var log = logging.Logger("vm")
var actorLog = logging.Logger("actors")
var gasOnActorExec = newGasCharge("OnActorExec", 0, 0)
// ResolveToKeyAddr returns the public key type of address (`BLS`/`SECP256K1`) of an account actor identified by `addr`.