diff --git a/QMPlusServer/main.go b/QMPlusServer/main.go index 5bcbf1b2..48969a34 100644 --- a/QMPlusServer/main.go +++ b/QMPlusServer/main.go @@ -1,9 +1,6 @@ package main import ( - "os" - - "fmt" "gin-vue-admin/cmd" "gin-vue-admin/config" "gin-vue-admin/init/initRedis" @@ -11,6 +8,7 @@ import ( "gin-vue-admin/init/initlog/qmlog" "gin-vue-admin/init/qmsql" "gin-vue-admin/init/registTable" + "os" //"runtime" ) @@ -28,8 +26,8 @@ var ( ) func main() { - if err:= qmlog.NewLogger(); err != nil { - fmt.Println(err) + if err := qmlog.NewLogger(); err != nil { + panic(err) } // 可以通过环境变量来覆盖配置值 // 未设定有效的环境变量时,使用配置值 diff --git a/QMPlusServer/static/config/config.json b/QMPlusServer/static/config/config.json index 57cbad6f..69ec2409 100644 --- a/QMPlusServer/static/config/config.json +++ b/QMPlusServer/static/config/config.json @@ -7,7 +7,7 @@ }, "mysqladmin": { "username": "root", - "password": "YINGL19980716.", + "password": "Aa@6447985", "path": "127.0.0.1:3306", "dbname": "qmPlus", "config": "charset=utf8\u0026parseTime=True\u0026loc=Local", @@ -33,5 +33,11 @@ "keyLong": 6, "imgWidth": 120, "imgHeight": 40 + }, + "log": { + "prefix": "[GIN-VUE-ADMIN]", + "logFile": false, + "stdout": ["DEBUG"], + "file": ["WARNING"] } } \ No newline at end of file