1
0

Other: added a few log entries related to gRPC server and client config files.

This commit is contained in:
Xavier Michelon
2022-10-13 08:49:00 +02:00
parent ee515394c0
commit d1a7ca7822
5 changed files with 53 additions and 23 deletions

View File

@ -47,12 +47,18 @@ func (s *Service) CheckTokens(ctx context.Context, clientConfigPath *wrapperspb.
return nil, err
}
path := clientConfigPath.Value
logEntry := s.log.WithField("path", path)
var clientConfig config
if err := clientConfig.load(clientConfigPath.Value); err != nil {
s.log.WithError(err).Error("could not read gRPC client config file")
if err := clientConfig.load(path); err != nil {
logEntry.WithError(err).Error("Could not read gRPC client config file")
return nil, err
}
logEntry.Info("gRPC client config file was successfully loaded")
return &wrapperspb.StringValue{Value: clientConfig.Token}, nil
}