deps: convert zap to slog (#2825)

This commit is contained in:
miampf 2024-02-08 14:20:01 +00:00 committed by GitHub
parent 3765cb0762
commit 54cce77bab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
182 changed files with 1474 additions and 1509 deletions

View file

@ -8,6 +8,7 @@ package main
import (
"errors"
"fmt"
"log/slog"
"path"
"github.com/edgelesssys/constellation/v2/internal/api/attestationconfigapi"
@ -16,7 +17,6 @@ import (
"github.com/edgelesssys/constellation/v2/internal/logger"
"github.com/edgelesssys/constellation/v2/internal/staticupload"
"github.com/spf13/cobra"
"go.uber.org/zap"
)
// newDeleteCmd creates the delete command.
@ -46,7 +46,7 @@ func newDeleteCmd() *cobra.Command {
}
func runDelete(cmd *cobra.Command, args []string) (retErr error) {
log := logger.New(logger.PlainLog, zap.DebugLevel).Named("attestationconfigapi")
log := logger.NewTextLogger(slog.LevelDebug).WithGroup("attestationconfigapi")
deleteCfg, err := newDeleteConfig(cmd, ([3]string)(args[:3]))
if err != nil {
@ -89,7 +89,7 @@ func runRecursiveDelete(cmd *cobra.Command, args []string) (retErr error) {
return fmt.Errorf("creating delete config: %w", err)
}
log := logger.New(logger.PlainLog, zap.DebugLevel).Named("attestationconfigapi")
log := logger.NewTextLogger(slog.LevelDebug).WithGroup("attestationconfigapi")
client, closeFn, err := staticupload.New(cmd.Context(), staticupload.Config{
Bucket: deleteCfg.bucket,
Region: deleteCfg.region,