mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
feat: 系统增加level配置项
This commit is contained in:
parent
721e87cb54
commit
16727105c4
@ -1,6 +1,7 @@
|
||||
system:
|
||||
port: 9999
|
||||
db_type: mysql
|
||||
level: debug
|
||||
|
||||
jwt:
|
||||
header_name: Authorization
|
||||
|
@ -3,4 +3,5 @@ package configs
|
||||
type System struct {
|
||||
Port int `mapstructure:"port"`
|
||||
DbType string `mapstructure:"db_type"`
|
||||
Level string `mapstructure:"level"`
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/docs"
|
||||
"github.com/1Panel-dev/1Panel/i18n"
|
||||
"github.com/1Panel-dev/1Panel/middleware"
|
||||
@ -11,6 +9,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
swaggerfiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
"html/template"
|
||||
)
|
||||
|
||||
func Routers() *gin.Engine {
|
||||
|
@ -31,6 +31,8 @@ func Start() {
|
||||
cache.Init()
|
||||
session.Init()
|
||||
binary.StartTTY()
|
||||
gin.SetMode(global.CONF.System.Level)
|
||||
|
||||
routers := router.Routers()
|
||||
address := fmt.Sprintf(":%d", global.CONF.System.Port)
|
||||
s := initServer(address, routers)
|
||||
|
Loading…
x
Reference in New Issue
Block a user