Skip to content

Commit

Permalink
Couple of logs in device.go
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
  • Loading branch information
jimmyaxod committed Nov 19, 2024
1 parent fc22b6f commit 21a6d79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/storage/device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ func NewDeviceWithLogging(ds *config.DeviceSchema, log types.RootLogger) (storag

// Optionally sync the device to S3
if ds.Sync != nil {
if log != nil {
log.Debug().Str("name", ds.Name).Msg("setting up S3 sync")
}

s3dest, err := sources.NewS3StorageCreate(ds.Sync.Secure,
ds.Sync.Endpoint,
Expand Down Expand Up @@ -411,6 +414,10 @@ func NewDeviceWithLogging(ds *config.DeviceSchema, log types.RootLogger) (storag
altSources = append(altSources, as)
}

if log != nil {
log.Debug().Str("name", ds.Name).Int("sources", len(altSources)).Msg("sync.stop returning altSources")
}

return altSources
}

Expand Down

0 comments on commit 21a6d79

Please sign in to comment.