This commit is contained in:
gotoeasy 2023-10-25 17:28:04 +08:00
parent 5cd29c79b1
commit bc4b53dd44

View File

@ -14,14 +14,14 @@ import (
"github.com/gotoeasy/glang/cmn" "github.com/gotoeasy/glang/cmn"
) )
var storeRoot string var storeRoot string = "/glogcenter" // 【固定】容器化缘故,不适合修改
var serverPort string = "8080" // 【固定】容器化缘故,不适合修改
var contextPath string = "/glc" // 【固定】容器化缘故,不适合修改
var storeChanLength int var storeChanLength int
var maxIdleTime int var maxIdleTime int
var storeNameAutoAddDate bool var storeNameAutoAddDate bool
var serverUrl string var serverUrl string
var serverIp string var serverIp string
var serverPort string = "8080"
var contextPath string = "/glc" // web服务contextPath固定【/glc】
var enableSecurityKey bool var enableSecurityKey bool
var securityKey string var securityKey string
var headerSecurityKey string var headerSecurityKey string
@ -63,7 +63,6 @@ func init() {
func UpdateConfigByEnv() { func UpdateConfigByEnv() {
// 读取环境变量初始化配置,各配置都有默认值 // 读取环境变量初始化配置,各配置都有默认值
storeRoot = cmn.GetEnvStr("GLC_STORE_ROOT", "/glogcenter") // 【X】存储根目录
storeChanLength = cmn.GetEnvInt("GLC_STORE_CHAN_LENGTH", 64) // 【X】存储通道长度 storeChanLength = cmn.GetEnvInt("GLC_STORE_CHAN_LENGTH", 64) // 【X】存储通道长度
maxIdleTime = cmn.GetEnvInt("GLC_MAX_IDLE_TIME", 180) // 【X】最大闲置时间,超过闲置时间将自动关闭0时表示不关闭 maxIdleTime = cmn.GetEnvInt("GLC_MAX_IDLE_TIME", 180) // 【X】最大闲置时间,超过闲置时间将自动关闭0时表示不关闭
storeNameAutoAddDate = cmn.GetEnvBool("GLC_STORE_NAME_AUTO_ADD_DATE", true) // 存储名是否自动添加日期日志量大通常按日单位区分存储默认true storeNameAutoAddDate = cmn.GetEnvBool("GLC_STORE_NAME_AUTO_ADD_DATE", true) // 存储名是否自动添加日期日志量大通常按日单位区分存储默认true