diff --git a/LiteCore/Database/LiveQuerier.cc b/LiteCore/Database/LiveQuerier.cc index afbdff6d47..25b8c3ff6a 100644 --- a/LiteCore/Database/LiveQuerier.cc +++ b/LiteCore/Database/LiveQuerier.cc @@ -49,7 +49,7 @@ namespace litecore { LiveQuerier::~LiveQuerier() { if ( _query ) _stop(); - //logVerbose("Deleted"); // It is not currently safe to log in a Logging destructor + logVerbose("Deleted"); } std::string LiveQuerier::loggingIdentifier() const { return string(_expression); } diff --git a/LiteCore/Database/SequenceTracker.cc b/LiteCore/Database/SequenceTracker.cc index 3226e27078..5bf3e25788 100644 --- a/LiteCore/Database/SequenceTracker.cc +++ b/LiteCore/Database/SequenceTracker.cc @@ -462,7 +462,7 @@ namespace litecore { } CollectionChangeNotifier::~CollectionChangeNotifier() { - //if ( callback ) logInfo("Deleting"); // It is not currently safe to log in a Logging destructor + if ( callback ) logInfo("Deleting"); if ( tracker ) { tracker->removePlaceholder(_placeholder); } } diff --git a/LiteCore/Query/SQLiteQuery.cc b/LiteCore/Query/SQLiteQuery.cc index f1101a809f..7aaa43c045 100644 --- a/LiteCore/Query/SQLiteQuery.cc +++ b/LiteCore/Query/SQLiteQuery.cc @@ -231,9 +231,7 @@ namespace litecore { rowCount, recording->data().size, elapsedTime * 1000); } - ~SQLiteQueryEnumerator() override { - //logInfo("Deleted"); // It is not currently safe to log in a Logging destructor - } + ~SQLiteQueryEnumerator() override { logInfo("Deleted"); } int64_t getRowCount() const override { return _recording->asArray()->count() / 2; // (every other row is a column bitmap) diff --git a/LiteCore/Storage/DataFile.cc b/LiteCore/Storage/DataFile.cc index 4c4c36eac6..f9c753342f 100644 --- a/LiteCore/Storage/DataFile.cc +++ b/LiteCore/Storage/DataFile.cc @@ -161,9 +161,7 @@ namespace litecore { for ( auto& i : _keyStores ) { i.second->close(); } _close(forDelete); - if ( _shared->removeDataFile(this) ) { - //logInfo("Closing database"); // It is not currently safe to log in a Logging destructor - } + if ( _shared->removeDataFile(this) ) { logInfo("Closing database"); } } void DataFile::reopen() { diff --git a/Networking/BLIP/BLIPConnection.cc b/Networking/BLIP/BLIPConnection.cc index 65164bd46d..f3cd76dfb8 100644 --- a/Networking/BLIP/BLIPConnection.cc +++ b/Networking/BLIP/BLIPConnection.cc @@ -162,7 +162,6 @@ namespace litecore::blip { protected: ~BLIPIO() override { -#if 0 // It is not currently safe to log in a Logging destructor double outboxDepth = (_countOutboxDepth != 0) ? (static_cast(_totalOutboxDepth) / static_cast(_countOutboxDepth)) @@ -173,7 +172,6 @@ namespace litecore::blip { _countOutboxDepth, _totalBytesWritten, _numRequestsReceived, _totalBytesRead, _timeOpen.elapsed(), _maxOutboxDepth, outboxDepth); logStats(); -#endif } void onWebSocketGotHTTPResponse(int status, const websocket::Headers& headers) override { diff --git a/Replicator/Worker.cc b/Replicator/Worker.cc index 9abe439289..fb18c8def9 100644 --- a/Replicator/Worker.cc +++ b/Replicator/Worker.cc @@ -109,7 +109,7 @@ namespace litecore::repl { : Worker(&parent->connection(), parent, parent->_options, parent->_db, namePrefix, coll) {} Worker::~Worker() { - //if ( _importance ) logStats(); // It is not currently safe to log in a Logging destructor + if ( _importance ) logStats(); logDebug("destructing (%p); actorName='%s'", this, actorName().c_str()); }