Skip to content

Commit 86d30f6

Browse files
authored
Fewer log message during dartdoc upload. (#1349)
1 parent 8271432 commit 86d30f6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/lib/dartdoc/backend.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,24 @@ class DartdocBackend {
7777
.where((fse) => fse is File)
7878
.map((fse) => fse as File);
7979

80+
int count = 0;
8081
Future upload(File file) async {
8182
final relativePath = p.relative(file.path, from: dir.path);
8283
final objectName = entry.objectName(relativePath);
8384
final isShared = storage_path.isSharedAsset(relativePath);
8485
if (isShared) {
8586
final info = await getFileInfo(entry, relativePath);
86-
if (info != null) {
87-
_logger.fine('$objectName has been already uploaded.');
88-
return;
89-
}
87+
if (info != null) return;
9088
}
91-
_logger.fine('Uploading to $objectName...');
9289
try {
9390
final sink =
9491
_storage.write(objectName, contentType: contentType(objectName));
9592
await sink.addStream(file.openRead());
9693
await sink.close();
94+
count++;
95+
if (count % 100 == 0) {
96+
_logger.info('Upload completed: $objectName (item #$count)');
97+
}
9798
} catch (e, st) {
9899
_logger.severe('Upload to $objectName failed with $e', st);
99100
rethrow;

0 commit comments

Comments
 (0)