修改 topic 默认值
This commit is contained in:
parent
98a6e56cb8
commit
30b584f0bd
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
out
|
||||
gen
|
||||
runtime
|
||||
/vendor
|
@ -70,13 +70,18 @@ func GenAliConfig(level Level) *AliLSConfig {
|
||||
endpoint = "cn-hongkong.log.aliyuncs.com"
|
||||
}
|
||||
source := os.Getenv("GRLOG_SOURCE")
|
||||
appName := os.Getenv("GRLOG_APP_NAME")
|
||||
topic := os.Getenv("GRLOG_TOPIC")
|
||||
if topic == "" {
|
||||
topic = appName
|
||||
}
|
||||
c := &AliLSConfig{
|
||||
Project: project,
|
||||
Endpoint: endpoint,
|
||||
KeyID: "LTAI5tMA7iMGFfuc3xSRVCGQ",
|
||||
KeySecret: "z98EpzmYmgiVLKizxP7pMF4BPbHfPV",
|
||||
LogStore: os.Getenv("GRLOG_APP_NAME"),
|
||||
Topics: []string{os.Getenv("GRLOG_TOPIC")},
|
||||
LogStore: appName,
|
||||
Topics: []string{topic},
|
||||
Source: source,
|
||||
Level: level,
|
||||
FlushWhen: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user