Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Nov 29, 2023
1 parent 3538d62 commit cd73b5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/storage/utils/metadata/cs3.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ func (cs3 *CS3) Init(ctx context.Context, spaceid string) (err error) {

// SimpleUpload uploads a file to the metadata storage
func (cs3 *CS3) SimpleUpload(ctx context.Context, uploadpath string, content []byte) error {
log := appctx.GetLogger(ctx).With().Logger()
log.Info().Str("uploadpath", uploadpath).Msg("cs3.SimpleUpload starting...")
ctx, span := tracer.Start(ctx, "SimpleUpload")
defer span.End()

Expand All @@ -142,17 +144,21 @@ func (cs3 *CS3) SimpleUpload(ctx context.Context, uploadpath string, content []b
// Upload uploads a file to the metadata storage
func (cs3 *CS3) Upload(ctx context.Context, req UploadRequest) (*UploadResponse, error) {
log := appctx.GetLogger(ctx).With().Logger()
log.Info().Str("path", req.Path).Msg("cs3.Upload starting...")
ctx, span := tracer.Start(ctx, "Upload")
defer span.End()
log.Info().Str("path", req.Path).Msg("cs3.Upload tracer started...")

client, err := cs3.providerClient()
if err != nil {
return nil, err
}
log.Info().Str("path", req.Path).Msg("cs3.Upload got provider client...")
ctx, err = cs3.getAuthContext(ctx)
if err != nil {
return nil, err
}
log.Info().Str("path", req.Path).Msg("cs3.Upload got auth context...")

ifuReq := &provider.InitiateFileUploadRequest{
Opaque: &types.Opaque{},
Expand Down

0 comments on commit cd73b5c

Please sign in to comment.