When initializing or creating an Azure repository, adjust the log output to JSON format.

Signed-off-by: hu-keyu <hzldd999@gmail.com>
pull/8861/head
hu-keyu 2025-04-11 15:43:56 +08:00
parent 0dbff6d239
commit 56164f9e69
1 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ package azure
import (
"context"
"github.com/vmware-tanzu/velero/pkg/util/logging"
"github.com/kopia/kopia/repo/blob"
"github.com/kopia/kopia/repo/blob/azure"
@ -56,7 +57,7 @@ func (s *Storage) ConnectionInfo() blob.ConnectionInfo {
func NewStorage(ctx context.Context, option *Option, isCreate bool) (blob.Storage, error) {
cfg := option.Config
client, _, err := azureutil.NewStorageClient(logrus.New(), cfg)
client, _, err := azureutil.NewStorageClient(logging.DefaultLogger(logrus.InfoLevel, logging.FormatJSON), cfg)
if err != nil {
return nil, err
}