feat: 独立debug选项,改善日志文件输出
This commit is contained in:
@@ -10,7 +10,8 @@ import (
|
||||
)
|
||||
|
||||
func Login(c *srunTransfer.Login) error {
|
||||
util.Log.Demo = c.Demo
|
||||
util.Log.Debug = c.Debug
|
||||
util.Log.WriteFile = c.WriteLog
|
||||
util.Log.OutPut = c.OutPut
|
||||
|
||||
G := util.GenerateLoginInfo(c.LoginInfo.Form, c.LoginInfo.Meta)
|
||||
@@ -101,7 +102,7 @@ func Login(c *srunTransfer.Login) error {
|
||||
return e
|
||||
} else {
|
||||
util.Log.Println("登录结果: " + G.LoginResult)
|
||||
if c.Demo {
|
||||
if c.Debug {
|
||||
util.Log.Println(res)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,10 @@ type LoginInfo struct {
|
||||
}
|
||||
|
||||
type Login struct {
|
||||
//文件日志输出开关
|
||||
Demo bool
|
||||
//Debug模式
|
||||
Debug bool
|
||||
//输出日志文件
|
||||
WriteLog bool
|
||||
//控制台日志打印开关
|
||||
OutPut bool
|
||||
//登陆前是否检查网络,只在离线时登录
|
||||
|
||||
Reference in New Issue
Block a user