From e6655504e9a5915415ce2c01bbeedf0c74daa33a Mon Sep 17 00:00:00 2001 From: liangzy Date: Tue, 28 Apr 2020 18:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0read=20me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- funtion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funtion.go b/funtion.go index 15f2fd9..9d42288 100644 --- a/funtion.go +++ b/funtion.go @@ -35,7 +35,7 @@ var adatperMapper = map[Adapter]func(l *Logger, level Level) error{ AdapterElasticSearch: func(l *Logger, level Level) error { dsn := "http://es-cn-0pp1mm3hq000dnbh4.public.elasticsearch.aliyuncs.com:9200/" - if envkey == "prod" || envkey == "" || envkey == "gray" { + if os.Getenv(envkey) == "prod" || os.Getenv(envkey) == "" || os.Getenv(envkey) == "gray" { dsn = "http://es-cn-0pp1mm3hq000dnbh4.elasticsearch.aliyuncs.com:9200/" }