From 0ca614e4baeb44b66c2f058d4aad264061b64897 Mon Sep 17 00:00:00 2001 From: Roman Iuvshyn Date: Tue, 28 Jan 2020 23:58:13 +0200 Subject: [PATCH] Update out_s3.go --- out_s3.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/out_s3.go b/out_s3.go index 14f15f5..02f6c64 100644 --- a/out_s3.go +++ b/out_s3.go @@ -188,8 +188,8 @@ func newS3Output(ctx unsafe.Pointer, operatorID int) (*s3operator, error) { logger.Infof("[flb-go %d] Starting fluent-bit-go-s3: %v", operatorID, version.Info()) logger.Infof("[flb-go %d] plugin credential parameter = '%s'", operatorID, credential) - logger.Infof("[flb-go %d] plugin accessKeyID parameter = '%s'", operatorID, obfuscateLog(accessKeyID)) - logger.Infof("[flb-go %d] plugin secretAccessKey parameter = '%s'", operatorID, obfuscateLog(secretAccessKey)) + logger.Infof("[flb-go %d] plugin accessKeyID parameter = '%s'", operatorID, obfuscateSecret(accessKeyID)) + logger.Infof("[flb-go %d] plugin secretAccessKey parameter = '%s'", operatorID, obfuscateSecret(secretAccessKey)) logger.Infof("[flb-go %d] plugin bucket parameter = '%s'", operatorID, bucket) logger.Infof("[flb-go %d] plugin s3prefix parameter = '%s'", operatorID, s3prefix) logger.Infof("[flb-go %d] plugin region parameter = '%s'", operatorID, region) @@ -367,7 +367,7 @@ func FLBPluginExit() int { return output.FLB_OK } -func obfuscateLog(message string) string { +func obfuscateSecret(message string) string { res := "" msgLen := len(message) if msgLen > 0 {