|
|
@@ -52,13 +52,22 @@ var adatperMapper = map[Adapter]func(l *Logger, level Level) error{ |
|
|
|
|
|
|
|
AdapterAliLs: func(l *Logger, level Level) error { |
|
|
|
|
|
|
|
var project string = "gaore-app-logstore" |
|
|
|
var endpoint string |
|
|
|
|
|
|
|
if os.Getenv(envkey) == "prod" || os.Getenv(envkey) == "" || os.Getenv(envkey) == "gray" { |
|
|
|
endpoint = project + ".cn-shenzhen-intranet.log.aliyuncs.com" |
|
|
|
} else if os.Getenv(envkey) == "dev" { |
|
|
|
endpoint = project + ".cn-shenzhen.log.aliyuncs.com" |
|
|
|
} |
|
|
|
|
|
|
|
c := AliLSConfig{ |
|
|
|
Project: "gaore-app-logstore", |
|
|
|
Endpoint: "gaore-app-logstore.cn-shenzhen.log.aliyuncs.com", |
|
|
|
Project: project, |
|
|
|
Endpoint: endpoint, |
|
|
|
KeyID: "LTAI4GCHwcqtrFD4DHRHxR4k", |
|
|
|
KeySecret: "Ln19xfVYy6OMlJeF9aBvFl4fhRUKBl", |
|
|
|
LogStore: "gaore-app-logstore", |
|
|
|
Topics: nil, |
|
|
|
Topics: []string{os.Getenv("GRLOG_APP_NAME")}, |
|
|
|
Source: "", |
|
|
|
Level: level, |
|
|
|
FlushWhen: 0, |
|
|
|