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{}) { func (rt *Runtime) Log(level vmr.LogLevel, msg string, args ...interface{}) {
switch level { switch level {
case vmr.DEBUG: case vmr.DEBUG:
log.Debugf(msg, args) actorLog.Debugf(msg, args)
case vmr.INFO: case vmr.INFO:
log.Infof(msg, args) actorLog.Infof(msg, args)
case vmr.WARN: case vmr.WARN:
log.Warnf(msg, args) actorLog.Warnf(msg, args)
case vmr.ERROR: case vmr.ERROR:
log.Errorf(msg, args) actorLog.Errorf(msg, args)
} }
} }

View File

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