reduce logging during permission denied errors (#18641)

log them if any only once
This commit is contained in:
Harshavardhana
2023-12-12 16:11:17 -08:00
committed by GitHub
parent 946b070744
commit d521c84d55
3 changed files with 11 additions and 10 deletions

View File

@@ -56,7 +56,7 @@ func storeDataUsageInBackend(ctx context.Context, objAPI ObjectLayer, dui <-chan
attempts = 1
}
if err = saveConfig(ctx, objAPI, dataUsageObjNamePath, dataUsageJSON); err != nil {
logger.LogIf(ctx, err)
logger.LogOnceIf(ctx, err, dataUsageObjNamePath)
}
attempts++
}