Skip to content

Commit 01ece50

Browse files
authored
cleanup debug logs (#60)
1 parent ff5b96d commit 01ece50

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

internal/client/sync/sync_engine.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,11 @@ func (se *SyncEngine) hasModified(f1, f2 *FileMetadata) bool {
515515

516516
// Option 3: Fallback to Size (more reliable than ModTime)
517517
if f1.Size != f2.Size {
518-
slog.Debug("hasModified", "f1.Size", f1.Size, "f2.Size", f2.Size)
519518
return true
520519
}
521520

522521
// Option 4: Fallback to ModTime (use cautiously, with tolerance?)
523522
if f1.LastModified != f2.LastModified {
524-
slog.Debug("hasModified", "f1.LastModified", f1.LastModified, "f2.LastModified", f2.LastModified)
525523
return true
526524
}
527525

internal/client/sync/sync_engine_priority_http_download.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,4 @@ func (se *SyncEngine) processHttpMessage(msg *syftmsg.Message) {
5555

5656
se.syncStatus.SetCompleted(syncRelPath)
5757

58-
slog.Info("sync", "type", SyncPriority, "op", OpWriteLocal, "msgType", msg.Type, "msgId", msg.Id, "path", httpMsg.SyftURL.ToLocalPath(), "size", fileSize, "etag", httpMsg.Etag)
59-
6058
}

internal/server/handlers/send/msg_store.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ func (m *BlobMsgStore) StoreMsg(ctx context.Context, path string, msgBytes []byt
4646
etag := fmt.Sprintf("%x", md5.Sum(msgBytes))
4747
fileSize := int64(len(msgBytes))
4848

49-
slog.Info("Storing message", "path", path, "etag", etag, "fileSize", fileSize)
50-
5149
_, err := m.blob.Backend().PutObject(ctx, &blob.PutObjectParams{
5250
Key: path,
5351
ETag: etag,
@@ -56,6 +54,7 @@ func (m *BlobMsgStore) StoreMsg(ctx context.Context, path string, msgBytes []byt
5654
})
5755

5856
if err != nil {
57+
slog.Error("rpc msg store", "type", "blob", "etag", etag, "fileSize", fileSize, "path", path, "error", err)
5958
return fmt.Errorf("failed to store message: %w", err)
6059
}
6160

0 commit comments

Comments
 (0)