common.go 513 字节
package constant

import (
	"fmt"
	"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
)

var (
	LogFilePath string = "F:/log/app.log"
	LogLevel    string = "error"
)

func init() {
	LogLevel = config.StringDefault("log_level", LogLevel)
	LogFilePath = config.StringDefault("aliyun_logs_access", LogFilePath)
}

func DebugConfig() {
	for i := range config.HistorySort {
		k := config.HistorySort[i]
		v, ok := config.History[k]
		if !ok {
			continue
		}
		log.Debug(fmt.Sprintf("【load config】 %v=%v", k, v))
	}
}