From c720eea90da1c7b3f264fc89a3c7f8bd58e753e9 Mon Sep 17 00:00:00 2001 From: alv00 Date: Wed, 7 Sep 2022 18:04:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E5=85=A8=E9=87=8F=E9=9A=90=E7=A7=81=E6=89=AB=E6=8F=8F=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E4=BF=AE=E6=94=B92=E4=B8=AA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E4=B8=AD=E6=96=87->=E8=8B=B1=E6=96=87?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=20/.secignore=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=94=A8=E6=9D=A5=E9=85=8D=E7=BD=AE=E9=9A=90=E7=A7=81=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E7=9A=84=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .secignore | 30 ++++++++++++++++++++++++++++++ config/config_property_meta.go | 2 +- log/logger.go | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .secignore diff --git a/.secignore b/.secignore new file mode 100644 index 0000000..dcdf756 --- /dev/null +++ b/.secignore @@ -0,0 +1,30 @@ +########################################################## +# OBFlow Secret Scan Ignore List # +########################################################## +# Above the segmentation lines there are suspected privacy information # +# Please use the file name as the first line and the igored information # +# should be started with tab. # +# Under the segmentation lines there are the folders which you need to ignore # +########################################################## +** + http://license.coscl.org.cn/MulanPSL2 + http://1.1.1.1:9093 + http://127.0.0.1:9100/metrics + http://127.0.0.1:9091/metrics/node + https://mirrors.aliyun.com/goproxy/ + https://facebook.github.io/watchman/ +-------------------------------------------------------- +# Should use GLOB wildcard to config and analysis the ignored folder +# The root patch shold start with '/' +/README.md +/README-CN.md +/LICENCE +/plugins/inputs/oceanbase/log/log_utils.go +/plugins/inputs/prometheus/prometheus_test.go +/docs/develop-guide.md +/docs/install-and-deploy/install-obagent.md +/docs/install-and-deploy/deploy-obagent-with-obd.md +/docs/install-and-deploy/deploy-obagent-manually.md +/.git/** +-------------------------------------------------------- +# Config the ignored fold to escape the Chinese scan by GLOB wildcard \ No newline at end of file diff --git a/config/config_property_meta.go b/config/config_property_meta.go index f374836..f0d0c46 100644 --- a/config/config_property_meta.go +++ b/config/config_property_meta.go @@ -39,7 +39,7 @@ func mergeConfigProperties() { } if property.Value == meta.DefaultValue { if meta.Masked { - // 数据需要脱敏,不打印内容 + // The data needs to be desensitized, and the content will not be printed log.Warnf("config key %s is still set as default value", key) } else { log.Warnf("config key %s is still set as default value:%+v", key, property.DefaultValue) diff --git a/log/logger.go b/log/logger.go index 915a27e..bdc3173 100644 --- a/log/logger.go +++ b/log/logger.go @@ -35,7 +35,7 @@ var textFormatter = &TextFormatter{ CallerPrettyfier: func(frame *runtime.Frame) (string, string) { n := 0 filename := frame.File - // 获取包名 + // get package name for i := len(filename) - 1; i > 0; i-- { if filename[i] == '/' { n++ -- GitLab