aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorNanoAkron <nanoakron@users.noreply.github.com>2016-10-03 22:11:00 +0100
committerNanoAkron <nanoakron@users.noreply.github.com>2016-10-03 22:11:00 +0100
commit8ed0d72b12e6b0d1733c106d07c1b1036507e81e (patch)
tree541da023a4cc9d6a80702e694cc8865dd8adb56e /src/cryptonote_core/blockchain.cpp
parentAdded messages at log level 2 to reflect deactivation procedure (diff)
downloadmonero-8ed0d72b12e6b0d1733c106d07c1b1036507e81e.tar.xz
Moved logging to target functions rather than caller
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index badb1a335..b9b9e2fb9 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -387,7 +387,7 @@ bool Blockchain::init(BlockchainDB* db, HardFork*& hf, const bool testnet)
//------------------------------------------------------------------
bool Blockchain::store_blockchain()
{
- LOG_PRINT_YELLOW("Blockchain::" << __func__, LOG_LEVEL_3);
+ LOG_PRINT_L3("Blockchain::" << __func__);
// lock because the rpc_thread command handler also calls this
CRITICAL_REGION_LOCAL(m_db->m_synchronization_lock);
@@ -419,9 +419,10 @@ bool Blockchain::deinit()
{
LOG_PRINT_L3("Blockchain::" << __func__);
- LOG_PRINT_L0("Closing IO Service.");
- // stop async service
- m_async_work_idle.reset();
+ LOG_PRINT_L1("Stopping blockchain read/write activity");
+
+ // stop async service
+ m_async_work_idle.reset();
m_async_pool.join_all();
m_async_service.stop();
@@ -436,14 +437,15 @@ bool Blockchain::deinit()
try
{
m_db->close();
+ LOG_PRINT_L1("Local blockchain read/write activity stopped successfully");
}
catch (const std::exception& e)
{
- LOG_PRINT_L0(std::string("Error closing blockchain db: ") + e.what());
+ LOG_ERROR(std::string("Error closing blockchain db: ") + e.what());
}
catch (...)
{
- LOG_PRINT_L0("There was an issue closing/storing the blockchain, shutting down now to prevent issues!");
+ LOG_ERROR("There was an issue closing/storing the blockchain, shutting down now to prevent issues!");
}
delete m_hardfork;