From cc0ffc96bf2229509de02ab3654cd368fb9f31c9 Mon Sep 17 00:00:00 2001 From: StevenLeiZhang Date: Wed, 10 Apr 2024 12:05:16 +0800 Subject: [PATCH] Fix: init automaxproc manually to disable it default stdout logger Signed-off-by: StevenLeiZhang --- util/compression/types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/compression/types.go b/util/compression/types.go index 63e00f2..ec9e773 100644 --- a/util/compression/types.go +++ b/util/compression/types.go @@ -16,9 +16,7 @@ limitations under the License. package compression -import ( - _ "go.uber.org/automaxprocs" -) +import "go.uber.org/automaxprocs/maxprocs" // Type the compression type type Type string @@ -45,6 +43,8 @@ type compressor interface { } func init() { + // init automaxprocs to disable its default stdout logger + maxprocs.Set() // Add compressors compressors[Gzip] = &gzipCompressor{} compressors[Zstd] = &zstdCompressor{}