Skip to content

Commit 11bf43e

Browse files
committed
refactor(ht_data_mongodb): use cascading for logging
- Replace multiple _logger.finer calls with a cascading ..finer calls - Improve code readability and maintainability
1 parent 71c0908 commit 11bf43e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/ht_data_mongodb.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ class HtDataMongodb<T> implements HtDataClient<T> {
243243
'Failed to create item: ${writeResult.writeError?.errmsg}',
244244
);
245245
}
246-
_logger.finer('insertOne successful for _id: ${doc['_id']}');
246+
_logger..finer('insertOne successful for _id: ${doc['_id']}')
247247

248248
// Best Practice: After insertion, fetch the canonical document from the
249249
// database to ensure the returned data is exactly what was stored.
250-
_logger.finer('Fetching newly created document for verification...');
250+
..finer('Fetching newly created document for verification...');
251251
final createdDoc = await _collection.findOne({'_id': doc['_id']});
252252
if (createdDoc == null) {
253253
_logger.severe(

0 commit comments

Comments
 (0)