Skip to content

Firefly III: a personal finances manager

Improve logging [skip ci]

James Cole38b1fc7aa6d6
diff --git a/app/TransactionRules/Triggers/AmountExactly.php b/app/TransactionRules/Triggers/AmountExactly.php
index cabe53c3df..678cfd5f23 100644
--- a/app/TransactionRules/Triggers/AmountExactly.php
+++ b/app/TransactionRules/Triggers/AmountExactly.php
@@ -75,11 +75,11 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
$compare = $this->triggerValue;
$result = bccomp($amount, $compare);
if (0 === $result) {
- Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %d matches %d exactly, so return true', $journal->id, $amount, $compare));
+ Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %f matches %f 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));
+ Log::debug(sprintf('RuleTrigger AmountExactly for journal #%d: %f matches %f NOT exactly, so return false', $journal->id, $amount, $compare));
return false;
}
diff --git a/app/TransactionRules/Triggers/AmountLess.php b/app/TransactionRules/Triggers/AmountLess.php
index d39579ab17..13325ef037 100644
--- a/app/TransactionRules/Triggers/AmountLess.php
+++ b/app/TransactionRules/Triggers/AmountLess.php
@@ -74,12 +74,12 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
$compare = $this->triggerValue;
$result = bccomp($amount, $compare);
if ($result === -1) {
- Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %d is less than %d, so return true', $journal->id, $amount, $compare));
+ Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %f is less than %f, so return true', $journal->id, $amount, $compare));
return true;
}
- Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %d is NOT less than %d, so return false', $journal->id, $amount, $compare));
+ Log::debug(sprintf('RuleTrigger AmountLess for journal #%d: %f is NOT less than %f, so return false', $journal->id, $amount, $compare));
return false;
}
diff --git a/app/TransactionRules/Triggers/AmountMore.php b/app/TransactionRules/Triggers/AmountMore.php
index 545542b279..3914513bd8 100644
--- a/app/TransactionRules/Triggers/AmountMore.php
+++ b/app/TransactionRules/Triggers/AmountMore.php
@@ -80,12 +80,12 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
$compare = $this->triggerValue;
$result = bccomp($amount, $compare);
if (1 === $result) {
- Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %d is more than %d, so return true', $journal->id, $amount, $compare));
+ Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %f is more than %f, so return true', $journal->id, $amount, $compare));
return true;
}
- Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %d is NOT more than %d, so return false', $journal->id, $amount, $compare));
+ Log::debug(sprintf('RuleTrigger AmountMore for journal #%d: %f is NOT more than %f, so return false', $journal->id, $amount, $compare));
return false;
}