Logging for rule triggers #322

This commit is contained in:
James Cole
2016-09-21 20:58:12 +02:00
parent a31b4ccf01
commit 27c832ed58
17 changed files with 88 additions and 11 deletions

View File

@@ -60,8 +60,11 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
$compare = $this->triggerValue;
$result = bccomp($amount, $compare, 4);
if ($result === 0) {
Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d exactly, so return true', $journal->id, $amount, $compare));
return true;
}
Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d NOT exactly, so return false', $journal->id, $amount, $compare));
return false;