rewrote doc/description strings in logger

fixed some stuff I didn't see

replaced forgotten zap reference
removed unneeded dependency
This commit is contained in:
miampf 2024-01-03 12:24:54 +01:00
parent 1d0c6aa7fc
commit 48d5a157dd
No known key found for this signature in database
GPG key ID: 376EAC0E5307A669
3 changed files with 3 additions and 5 deletions

View file

@ -35,7 +35,6 @@ import (
"github.com/edgelesssys/constellation/v2/internal/logger"
"github.com/edgelesssys/constellation/v2/internal/role"
"github.com/spf13/afero"
"go.uber.org/zap"
)
const (

View file

@ -27,7 +27,6 @@ import (
"github.com/edgelesssys/constellation/v2/internal/grpc/grpclog"
"github.com/edgelesssys/constellation/v2/internal/kms/kms"
"github.com/edgelesssys/constellation/v2/internal/logger"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@ -105,7 +104,7 @@ func (s *RecoveryServer) Serve(ctx context.Context, listener net.Listener, diskU
func (s *RecoveryServer) Recover(ctx context.Context, req *recoverproto.RecoverMessage) (*recoverproto.RecoverResponse, error) {
s.mux.Lock()
defer s.mux.Unlock()
log := s.log.With(zap.String("peer", grpclog.PeerAddrFromContext(ctx)))
log := s.log.With(slog.String("peer", grpclog.PeerAddrFromContext(ctx)))
log.Infof("Received recover call")

View file

@ -11,9 +11,9 @@ import (
)
// CmdLineVerbosityDescription explains numeric log levels.
const CmdLineVerbosityDescription = "log verbosity in zap logging levels. Use -1 for debug information, 0 for info, 1 for warn, 2 for error"
const CmdLineVerbosityDescription = "log verbosity in slog logging levels. Use -1 for debug information, 0 for info, 1 for warn, 2 for error"
// VerbosityFromInt converts a verbosity level from an integer to a zapcore.Level.
// VerbosityFromInt converts a verbosity level from an integer to a slog.Level.
func VerbosityFromInt(verbosity int) slog.Level {
switch {
case verbosity <= -1: