mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-11 10:45:14 -04:00
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:
parent
1d0c6aa7fc
commit
48d5a157dd
3 changed files with 3 additions and 5 deletions
|
@ -35,7 +35,6 @@ import (
|
||||||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||||
"github.com/edgelesssys/constellation/v2/internal/role"
|
"github.com/edgelesssys/constellation/v2/internal/role"
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
"go.uber.org/zap"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -27,7 +27,6 @@ import (
|
||||||
"github.com/edgelesssys/constellation/v2/internal/grpc/grpclog"
|
"github.com/edgelesssys/constellation/v2/internal/grpc/grpclog"
|
||||||
"github.com/edgelesssys/constellation/v2/internal/kms/kms"
|
"github.com/edgelesssys/constellation/v2/internal/kms/kms"
|
||||||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||||
"go.uber.org/zap"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"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) {
|
func (s *RecoveryServer) Recover(ctx context.Context, req *recoverproto.RecoverMessage) (*recoverproto.RecoverResponse, error) {
|
||||||
s.mux.Lock()
|
s.mux.Lock()
|
||||||
defer s.mux.Unlock()
|
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")
|
log.Infof("Received recover call")
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// CmdLineVerbosityDescription explains numeric log levels.
|
// 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 {
|
func VerbosityFromInt(verbosity int) slog.Level {
|
||||||
switch {
|
switch {
|
||||||
case verbosity <= -1:
|
case verbosity <= -1:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue