From f410efe1e11c9642a070dfa036615d1f29b1fc92 Mon Sep 17 00:00:00 2001 From: clannadxr Date: Wed, 22 Jun 2022 15:30:41 +0800 Subject: [PATCH] Default EnableSkipHealthLog --- server/egrpc/config.go | 4 ++-- server/egrpc/config_test.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/egrpc/config.go b/server/egrpc/config.go index 48afb427..9875a02f 100644 --- a/server/egrpc/config.go +++ b/server/egrpc/config.go @@ -20,7 +20,7 @@ type Config struct { EnableMetricInterceptor bool // 是否开启监控,默认开启 EnableTraceInterceptor bool // 是否开启链路追踪,默认开启 EnableOfficialGrpcLog bool // 是否开启官方grpc日志,默认关闭 - EnableSkipHealthLog bool // 是否屏蔽探活日志,默认关闭 + EnableSkipHealthLog bool // 是否屏蔽探活日志,默认开启 SlowLogThreshold time.Duration // 服务慢日志,默认500ms EnableAccessInterceptor bool // 是否开启,记录请求数据 EnableAccessInterceptorReq bool // 是否开启记录请求参数,默认不开启 @@ -40,7 +40,7 @@ func DefaultConfig() *Config { Port: 9002, Deployment: "", EnableMetricInterceptor: true, - EnableSkipHealthLog: false, + EnableSkipHealthLog: true, EnableTraceInterceptor: true, SlowLogThreshold: xtime.Duration("500ms"), EnableAccessInterceptor: true, diff --git a/server/egrpc/config_test.go b/server/egrpc/config_test.go index a562b7be..3d6cb580 100644 --- a/server/egrpc/config_test.go +++ b/server/egrpc/config_test.go @@ -11,4 +11,5 @@ func TestDefaultConfig(t *testing.T) { assert.Equal(t, "tcp4", cfg.Network) assert.Equal(t, 9002, cfg.Port) assert.Equal(t, ":9002", cfg.Address()) + assert.Equal(t, true, cfg.EnableSkipHealthLog) }