diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-07-01 14:14:23 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-07-01 14:14:23 -0400 |
commit | 746ca1fe6d15528b444f35e6a65d3c93e4976894 (patch) | |
tree | ba9ee972ca3e874d06fa8dd53d1bd84bf6c12fd4 | |
parent | 1c6e7f410b62e7d8289992600d2f5b289a214290 (diff) | |
download | fork-ledger-746ca1fe6d15528b444f35e6a65d3c93e4976894.tar.gz fork-ledger-746ca1fe6d15528b444f35e6a65d3c93e4976894.tar.bz2 fork-ledger-746ca1fe6d15528b444f35e6a65d3c93e4976894.zip |
Unify debugging categories
Debugging categories follow the filename, which in this case is singular
(rather than plural) "account" and "amount".
-rw-r--r-- | src/amount.cc | 8 | ||||
-rw-r--r-- | src/annotate.cc | 4 | ||||
-rw-r--r-- | src/iterators.cc | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/amount.cc b/src/amount.cc index 7bf4dfc6..5d74c22e 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -301,7 +301,7 @@ void amount_t::_copy(const amount_t& amt) quantity = new bigint_t(*amt.quantity); } else { quantity = amt.quantity; - DEBUG("amounts.refs", + DEBUG("amount.refs", quantity << " refc++, now " << (quantity->refc + 1)); quantity->refc++; } @@ -339,7 +339,7 @@ void amount_t::_release() { VERIFY(valid()); - DEBUG("amounts.refs", quantity << " refc--, now " << (quantity->refc - 1)); + DEBUG("amount.refs", quantity << " refc--, now " << (quantity->refc - 1)); if (--quantity->refc == 0) { if (quantity->has_flags(BIGINT_BULK_ALLOC)) @@ -928,7 +928,7 @@ void amount_t::annotate(const annotation_t& details) } assert(this_base); - DEBUG("amounts.commodities", "Annotating commodity for amount " + DEBUG("amount.commodities", "Annotating commodity for amount " << *this << std::endl << details); if (commodity_t * ann_comm = @@ -939,7 +939,7 @@ void amount_t::annotate(const annotation_t& details) assert(false); #endif - DEBUG("amounts.commodities", "Annotated amount is " << *this); + DEBUG("amount.commodities", "Annotated amount is " << *this); } bool amount_t::has_annotation() const diff --git a/src/annotate.cc b/src/annotate.cc index 0cb7a24e..89363dd5 100644 --- a/src/annotate.cc +++ b/src/annotate.cc @@ -187,8 +187,8 @@ void annotation_t::parse(std::istream& in) } while (true); #if DEBUG_ON - if (SHOW_DEBUG("amounts.commodities") && *this) { - DEBUG("amounts.commodities", + if (SHOW_DEBUG("amount.commodities") && *this) { + DEBUG("amount.commodities", "Parsed commodity annotations: " << std::endl << *this); } #endif diff --git a/src/iterators.cc b/src/iterators.cc index f02c5f04..fd6cde69 100644 --- a/src/iterators.cc +++ b/src/iterators.cc @@ -204,9 +204,9 @@ void sorted_accounts_iterator::push_back(account_t& account) compare_items<account_t>(sort_cmp)); #if DEBUG_ON - if (SHOW_DEBUG("accounts.sorted")) { + if (SHOW_DEBUG("account.sorted")) { foreach (account_t * acct, accounts_list.back()) - DEBUG("accounts.sorted", + DEBUG("account.sorted", "Account (flat): " << acct->fullname()); } #endif @@ -237,9 +237,9 @@ void sorted_accounts_iterator::sort_accounts(account_t& account, compare_items<account_t>(sort_cmp)); #if DEBUG_ON - if (SHOW_DEBUG("accounts.sorted")) { + if (SHOW_DEBUG("account.sorted")) { foreach (account_t * acct, deque) - DEBUG("accounts.sorted", "Account: " << acct->fullname()); + DEBUG("account.sorted", "Account: " << acct->fullname()); } #endif } |