Skip to content

Commit bc5701a

Browse files
committedMay 2, 2018
Use new logging in the rest of Executive
1 parent ef9f7b6 commit bc5701a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎libethereum/Executive.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ bool Executive::execute()
258258
// Entry point for a user-executed transaction.
259259

260260
// Pay...
261-
clog(StateDetail) << "Paying " << formatBalance(m_gasCost) << " from sender for gas (" << m_t.gas() << " gas at " << formatBalance(m_t.gasPrice()) << ")";
261+
LOG(m_detailsLogger) << "Paying " << formatBalance(m_gasCost) << " from sender for gas ("
262+
<< m_t.gas() << " gas at " << formatBalance(m_t.gasPrice()) << ")";
262263
m_s.subBalance(m_t.sender(), m_gasCost);
263264

264265
assert(m_t.gas() >= (u256)m_baseGasRequired);
@@ -374,7 +375,7 @@ bool Executive::executeCreate(Address const& _sender, u256 const& _endowment, u2
374375
bool accountAlreadyExist = (m_s.addressHasCode(m_newAddress) || m_s.getNonce(m_newAddress) > 0);
375376
if (accountAlreadyExist)
376377
{
377-
clog(StateSafeExceptions) << "Address already used: " << m_newAddress;
378+
LOG(m_detailsLogger) << "Address already used: " << m_newAddress;
378379
m_gas = 0;
379380
m_excepted = TransactionException::AddressAlreadyUsed;
380381
revert();
@@ -474,7 +475,7 @@ bool Executive::go(OnOpFunc const& _onOp)
474475
}
475476
catch (VMException const& _e)
476477
{
477-
clog(StateSafeExceptions) << "Safe VM Exception. " << diagnostic_information(_e);
478+
LOG(m_detailsLogger) << "Safe VM Exception. " << diagnostic_information(_e);
478479
m_gas = 0;
479480
m_excepted = toTransactionException(_e);
480481
revert();

‎libethereum/Executive.h

+1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ class Executive
212212
size_t m_savepoint = 0;
213213

214214
Logger m_execLogger{createLogger(1, "exec")};
215+
Logger m_detailsLogger{createLogger(14, "exec")};
215216
Logger m_vmTraceLogger{createLogger(11, "vmtrace")};
216217
};
217218

0 commit comments

Comments
 (0)
Please sign in to comment.