作者 陈志颖

合并分支 'dev' 到 'test'

chore:修改日志



查看合并请求 !7
... ... @@ -69,6 +69,8 @@ spec:
value: "https://suplus-worth-app-gateway-dev.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "http://mmm-open-api-dev.fjmaimaimai.com"
- name: LOG_PREFIX
value: "[mmm-worth_dev]"
volumes:
- name: accesslogs
emptyDir: {}
\ No newline at end of file
... ...
... ... @@ -72,6 +72,8 @@ spec:
value: "https://suplus-worth-app-gateway-prd.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "https://public-interface.fjmaimaimai.com/openapi"
- name: LOG_PREFIX
value: "[mmm-worth_prd]"
volumes:
- name: accesslogs
emptyDir: {}
\ No newline at end of file
... ...
... ... @@ -69,6 +69,8 @@ spec:
value: "https://suplus-worth-app-gateway-test.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "http://mmm-open-api-test.fjmaimaimai.com"
- name: LOG_PREFIX
value: "[mmm-worth_test]"
volumes:
- name: accesslogs
emptyDir: {}
\ No newline at end of file
... ...
... ... @@ -9,6 +9,7 @@ var MMM_OPEN_API_SERVICE_HOST = "http://mmm-open-api-dev.fjmaimaimai.com"
var LOG_LEVEL = "debug"
var LOG_File = "logs/app.log"
var LOG_PREFIX = "[mmm-worth_dev]"
func init() {
if os.Getenv("LOG_LEVEL") != "" {
... ... @@ -20,4 +21,7 @@ func init() {
if os.Getenv("MMM_OPEN_API_SERVICE_HOST") != "" {
MMM_OPEN_API_SERVICE_HOST = os.Getenv("MMM_OPEN_API_SERVICE_HOST")
}
if os.Getenv("LOG_PREFIX") != "" {
LOG_PREFIX = os.Getenv("LOG_PREFIX")
}
}
... ...
... ... @@ -2,7 +2,7 @@
//var Logger log.Logger
// TODO 日志输出
// 日志输出
//func init() {
// Logger = logrus.NewLogrusLogger()
// Logger.SetServiceName(constant.SERVICE_NAME)
... ... @@ -51,6 +51,7 @@ func NewBeegoLogger(conf LoggerConfig) *logs.BeeLogger {
log.SetLevel(ilv)
log.EnableFuncCallDepth(true)
log.SetLogFuncCallDepth(5)
log.SetPrefix(constant.LOG_PREFIX)
return log
}
... ...