Skip to content

Commit

Permalink
reintroduce logrus
Browse files Browse the repository at this point in the history
  • Loading branch information
greedy52 committed Aug 21, 2024
1 parent ec46b01 commit 4263974
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"crypto/sha1"
"encoding/hex"
"fmt"
"log/slog"
"net/http"
"net/textproto"
"sort"
Expand All @@ -34,6 +33,7 @@ import (
v4 "github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/service/iam"
"github.com/gravitational/trace"
"github.com/sirupsen/logrus"

apievents "github.com/gravitational/teleport/api/types/events"
apiawsutils "github.com/gravitational/teleport/api/utils/aws"
Expand Down Expand Up @@ -254,7 +254,7 @@ func FilterAWSRoles(arns []string, accountID string) (result Roles) {
for _, roleARN := range arns {
parsed, err := ParseRoleARN(roleARN)
if err != nil {
slog.WarnContext(context.Background(), "Skipping invalid AWS role ARN.", "error", err)
logrus.Warnf("skipping invalid AWS role ARN: %v", err)
continue
}
if accountID != "" && parsed.AccountID != accountID {
Expand Down Expand Up @@ -510,6 +510,6 @@ func MaybeHashRoleSessionName(roleSessionName string) (ret string) {
}

ret = fmt.Sprintf("%s-%s", roleSessionName[:keepPrefixIndex], hex)
slog.DebugContext(context.Background(), "AWS role session name is too long. Using a hash instead.", "hashed", ret, "original", roleSessionName)
logrus.Debugf("AWS role session name %q is too long. Using a hash %q instead.", roleSessionName, ret)
return ret
}

0 comments on commit 4263974

Please sign in to comment.