Add the migrationLogger struct
This commit is contained in:
parent
99ea5b62ea
commit
f6a0da3751
@ -5,6 +5,8 @@ import (
|
||||
"context"
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/filecoin-project/go-state-types/rt"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
"github.com/filecoin-project/go-state-types/big"
|
||||
@ -52,6 +54,21 @@ type Upgrade struct {
|
||||
|
||||
type UpgradeSchedule []Upgrade
|
||||
|
||||
type migrationLogger struct{}
|
||||
|
||||
func (ml migrationLogger) Log(level rt.LogLevel, msg string, args ...interface{}) {
|
||||
switch level {
|
||||
case rt.DEBUG:
|
||||
log.Debugf(msg, args...)
|
||||
case rt.INFO:
|
||||
log.Infof(msg, args...)
|
||||
case rt.WARN:
|
||||
log.Warnf(msg, args...)
|
||||
case rt.ERROR:
|
||||
log.Errorf(msg, args...)
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultUpgradeSchedule() UpgradeSchedule {
|
||||
var us UpgradeSchedule
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user