Skip to content

Commit bcf5636

Browse files
committed
Improve log message when secret data is not a json
1 parent bbf92a7 commit bcf5636

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

parser.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"encoding/json"
55
"fmt"
6-
"log"
76
)
87

98
// ContentParser defines secret content parser behaviors
@@ -35,7 +34,7 @@ type JSONContentParser struct {
3534
func (j *JSONContentParser) Parse(s *SecretData) []*SecretData {
3635
m := map[string]interface{}{}
3736
if err := json.Unmarshal([]byte(s.Data), &m); err != nil {
38-
log.Println("WARN: invalid json")
37+
fmt.Printf("\nWARN: [%s] invalid json\n", s.Name)
3938
}
4039

4140
var secrets []*SecretData

0 commit comments

Comments
 (0)