Skip to content

Commit

Permalink
Improve debug logger
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Feb 9, 2023
1 parent 92fad50 commit 9e6ba5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/fluent/fluent-bit-go v0.0.0-20220311094233-780004bf5562
github.com/google/uuid v1.3.0
github.com/influxdata/go-syslog/v2 v2.0.1
github.com/philips-software/go-hsdp-api v0.78.7
github.com/philips-software/go-hsdp-api v0.79.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ github.com/influxdata/go-syslog/v2 v2.0.1/go.mod h1:hjvie1UTaD5E1fTnDmxaCw8RRDrT
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg=
github.com/philips-software/go-hsdp-api v0.78.7 h1:NyGvZ0TSrTfVEYwA6ZdDpWghoBjGuHR5uhcZqYucVRE=
github.com/philips-software/go-hsdp-api v0.78.7/go.mod h1:J9j11CrQR7OXcvsSo+/kE20mkKpAuqB1dxVnXQETsf4=
github.com/philips-software/go-hsdp-api v0.79.0 h1:aiQ2o5xdSvBtZeSnalodQvgADQKHY/MgFdiKq7um+OE=
github.com/philips-software/go-hsdp-api v0.79.0/go.mod h1:J9j11CrQR7OXcvsSo+/kE20mkKpAuqB1dxVnXQETsf4=
github.com/philips-software/go-hsdp-signer v1.4.0 h1:yg7UILhmI4xJhr/tQiAiQwJL0EZFvLuMqpH2GZ9ygY4=
github.com/philips-software/go-hsdp-signer v1.4.0/go.mod h1:/QehZ/+Aks2t1TFpjhF/7ZSB8PJIIJHzLc03rOqwLw0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
13 changes: 6 additions & 7 deletions hsdp/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,16 @@ func FLBPluginInit(ctx unsafe.Pointer) int {
validCreds = true
}
if serviceID != "" && servicePrivateKey != "" {
debugLog := ""
if enableDebug {
debugLog = "/dev/stderr"
}
iamClient, err := iam.NewClient(nil, &iam.Config{
cfg := &iam.Config{
Region: region,
Environment: environment,
IDMURL: idmURL,
IAMURL: iamURL,
DebugLog: debugLog,
})
}
if enableDebug {
cfg.DebugLog = os.Stderr
}
iamClient, err := iam.NewClient(nil, cfg)
if err != nil {
fmt.Printf("[out-hsdp] invalid service credentials: %v\n", err)
plugin.Exit(1)
Expand Down

0 comments on commit 9e6ba5a

Please sign in to comment.