1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

fix bugs.

This commit is contained in:
Mrs4s 2021-01-26 04:51:39 +08:00
parent 430e734ff6
commit 717f816294
2 changed files with 6 additions and 3 deletions

View File

@ -92,7 +92,7 @@ func (hook *LocalHook) SetFormatter(formatter logrus.Formatter) {
// todo
}
}
logrus.SetFormatter(formatter)
hook.formatter = formatter
}
@ -147,6 +147,7 @@ func GetLogLevel(level string) []logrus.Level {
return []logrus.Level{logrus.ErrorLevel, logrus.FatalLevel,
logrus.PanicLevel}
default:
return logrus.AllLevels
return []logrus.Level{logrus.InfoLevel, logrus.WarnLevel,
logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel}
}
}

View File

@ -25,8 +25,8 @@ import (
"github.com/Mrs4s/go-cqhttp/server"
"github.com/guonaihong/gout"
"github.com/tidwall/gjson"
"golang.org/x/term"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/term"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client"
@ -213,6 +213,8 @@ func main() {
log.Fatalf("加密存储的密码损坏,请尝试重新配置密码")
}
copy(global.PasswordHash[:], ph)
} else {
global.PasswordHash = md5.Sum([]byte(conf.Password))
}
if !isFastStart {
log.Info("Bot将在5秒后登录并开始信息处理, 按 Ctrl+C 取消.")