Skip to content

Commit

Permalink
Add bucket&objects logging
Browse files Browse the repository at this point in the history
Add fields that we already had for reading objects
  • Loading branch information
mulbc committed Jun 12, 2020
1 parent d80bf75 commit 1c60399
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions worker/workItems.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,20 @@ func (op ReadOperation) Do() error {

// Do executes the actual work of the WriteOperation
func (op WriteOperation) Do() error {
log.Debug("Doing WriteOperation")
log.WithField("bucket", op.Bucket).WithField("object", op.ObjectName).Debug("Doing WriteOperation")
return putObject(svc, op.ObjectName, bytes.NewReader(generateRandomBytes(op.ObjectSize)), op.Bucket)
}

// Do executes the actual work of the ListOperation
func (op ListOperation) Do() error {
log.Debug("Doing ListOperation")
log.WithField("bucket", op.Bucket).WithField("object", op.ObjectName).Debug("Doing ListOperation")
_, err := listObjects(svc, op.ObjectName, op.Bucket)
return err
}

// Do executes the actual work of the DeleteOperation
func (op DeleteOperation) Do() error {
log.Debug("Doing DeleteOperation")
log.WithField("bucket", op.Bucket).WithField("object", op.ObjectName).Debug("Doing DeleteOperation")
return deleteObject(svc, op.ObjectName, op.Bucket)
}

Expand Down

0 comments on commit 1c60399

Please sign in to comment.