正在显示
5 个修改的文件
包含
14 行增加
和
1 行删除
@@ -82,6 +82,10 @@ spec: | @@ -82,6 +82,10 @@ spec: | ||
82 | value: "" | 82 | value: "" |
83 | - name: KAFKA_CONSUMER_ID | 83 | - name: KAFKA_CONSUMER_ID |
84 | value: "partnermg_dev" | 84 | value: "partnermg_dev" |
85 | + - name: RUN_MODE | ||
86 | + value: "dev" | ||
87 | + - name: Log_PREFIX | ||
88 | + value: "[partnermg_dev]" | ||
85 | volumes: | 89 | volumes: |
86 | - name: accesslogs | 90 | - name: accesslogs |
87 | emptyDir: {} | 91 | emptyDir: {} |
@@ -82,6 +82,10 @@ spec: | @@ -82,6 +82,10 @@ spec: | ||
82 | value: "192.168.0.250:9092;192.168.0.251:9092;192.168.0.252:9092" | 82 | value: "192.168.0.250:9092;192.168.0.251:9092;192.168.0.252:9092" |
83 | - name: KAFKA_CONSUMER_ID | 83 | - name: KAFKA_CONSUMER_ID |
84 | value: "partnermg_prd" | 84 | value: "partnermg_prd" |
85 | + - name: RUN_MODE | ||
86 | + value: "dev" | ||
87 | + - name: Log_PREFIX | ||
88 | + value: "[partnermg_prd]" | ||
85 | volumes: | 89 | volumes: |
86 | - name: accesslogs | 90 | - name: accesslogs |
87 | emptyDir: {} | 91 | emptyDir: {} |
@@ -79,6 +79,10 @@ spec: | @@ -79,6 +79,10 @@ spec: | ||
79 | value: "192.168.0.250:9092;192.168.0.251:9092;192.168.0.252:9092" | 79 | value: "192.168.0.250:9092;192.168.0.251:9092;192.168.0.252:9092" |
80 | - name: KAFKA_CONSUMER_ID | 80 | - name: KAFKA_CONSUMER_ID |
81 | value: "partnermg_test" | 81 | value: "partnermg_test" |
82 | + - name: RUN_MODE | ||
83 | + value: "dev" | ||
84 | + - name: Log_PREFIX | ||
85 | + value: "[partnermg_test]" | ||
82 | volumes: | 86 | volumes: |
83 | - name: accesslogs | 87 | - name: accesslogs |
84 | emptyDir: {} | 88 | emptyDir: {} |
@@ -6,7 +6,7 @@ const SERVICE_NAME = "partnermg" | @@ -6,7 +6,7 @@ const SERVICE_NAME = "partnermg" | ||
6 | 6 | ||
7 | var LOG_LEVEL = "debug" | 7 | var LOG_LEVEL = "debug" |
8 | var LOG_File = "./logs/partnermg.log" | 8 | var LOG_File = "./logs/partnermg.log" |
9 | - | 9 | +var Log_PREFIX = "[partnermg_dev]" |
10 | var ( | 10 | var ( |
11 | UCENTER_HOST = "https://suplus-ucenter-test.fjmaimaimai.com" //统一用户中心地址 | 11 | UCENTER_HOST = "https://suplus-ucenter-test.fjmaimaimai.com" //统一用户中心地址 |
12 | UCENTER_SECRET = "cykbjnfqgctn" | 12 | UCENTER_SECRET = "cykbjnfqgctn" |
@@ -12,6 +12,7 @@ func init() { | @@ -12,6 +12,7 @@ func init() { | ||
12 | logs.SetLevel(logLevel(constant.LOG_LEVEL)) | 12 | logs.SetLevel(logLevel(constant.LOG_LEVEL)) |
13 | logs.SetLogFuncCall(false) | 13 | logs.SetLogFuncCall(false) |
14 | logs.SetLogger("file", getlogFileConfig()) | 14 | logs.SetLogger("file", getlogFileConfig()) |
15 | + logs.SetPrefix(constant.Log_PREFIX) | ||
15 | logs.Async() | 16 | logs.Async() |
16 | logs.Async(2 * 1e3) | 17 | logs.Async(2 * 1e3) |
17 | } | 18 | } |
-
请 注册 或 登录 后发表评论