mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
26 lines
522 B
C++
26 lines
522 B
C++
|
// Copyright (c) 2018 The Dash Core developers
|
||
|
// Distributed under the MIT/X11 software license, see the accompanying
|
||
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||
|
|
||
|
#include "batchedlogger.h"
|
||
|
#include "util.h"
|
||
|
|
||
|
CBatchedLogger::CBatchedLogger(const std::string& _header) :
|
||
|
header(_header)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
CBatchedLogger::~CBatchedLogger()
|
||
|
{
|
||
|
Flush();
|
||
|
}
|
||
|
|
||
|
void CBatchedLogger::Flush()
|
||
|
{
|
||
|
if (msg.empty()) {
|
||
|
return;
|
||
|
}
|
||
|
LogPrintStr(strprintf("%s:\n%s", header, msg));
|
||
|
msg.clear();
|
||
|
}
|