作者 唐旭辉

更新 log 输出格式

... ... @@ -82,6 +82,10 @@ spec:
value: ""
- name: KAFKA_CONSUMER_ID
value: "partnermg_dev"
- name: RUN_MODE
value: "dev"
- name: Log_PREFIX
value: "[partnermg_dev]"
volumes:
- name: accesslogs
emptyDir: {}
... ...
... ... @@ -82,6 +82,10 @@ spec:
value: "192.168.0.250:9092;192.168.0.251:9092;192.168.0.252:9092"
- name: KAFKA_CONSUMER_ID
value: "partnermg_prd"
- name: RUN_MODE
value: "dev"
- name: Log_PREFIX
value: "[partnermg_prd]"
volumes:
- name: accesslogs
emptyDir: {}
... ...
... ... @@ -79,6 +79,10 @@ spec:
value: "192.168.0.250:9092;192.168.0.251:9092;192.168.0.252:9092"
- name: KAFKA_CONSUMER_ID
value: "partnermg_test"
- name: RUN_MODE
value: "dev"
- name: Log_PREFIX
value: "[partnermg_test]"
volumes:
- name: accesslogs
emptyDir: {}
... ...
... ... @@ -6,7 +6,7 @@ const SERVICE_NAME = "partnermg"
var LOG_LEVEL = "debug"
var LOG_File = "./logs/partnermg.log"
var Log_PREFIX = "[partnermg_dev]"
var (
UCENTER_HOST = "https://suplus-ucenter-test.fjmaimaimai.com" //统一用户中心地址
UCENTER_SECRET = "cykbjnfqgctn"
... ...
... ... @@ -12,6 +12,7 @@ func init() {
logs.SetLevel(logLevel(constant.LOG_LEVEL))
logs.SetLogFuncCall(false)
logs.SetLogger("file", getlogFileConfig())
logs.SetPrefix(constant.Log_PREFIX)
logs.Async()
logs.Async(2 * 1e3)
}
... ...