mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add logging to processor #322
This commit is contained in:
parent
27c832ed58
commit
70ea227bd0
@ -93,6 +93,7 @@ final class Processor
|
|||||||
*/
|
*/
|
||||||
public static function makeFromString(string $triggerName, string $triggerValue)
|
public static function makeFromString(string $triggerName, string $triggerValue)
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('Processor::makeFromString("%s", "%s")', $triggerName, $triggerValue));
|
||||||
$self = new self;
|
$self = new self;
|
||||||
$trigger = TriggerFactory::makeTriggerFromStrings($triggerName, $triggerValue, false);
|
$trigger = TriggerFactory::makeTriggerFromStrings($triggerName, $triggerValue, false);
|
||||||
$self->triggers->push($trigger);
|
$self->triggers->push($trigger);
|
||||||
@ -160,6 +161,7 @@ final class Processor
|
|||||||
*/
|
*/
|
||||||
public function handleTransactionJournal(TransactionJournal $journal): bool
|
public function handleTransactionJournal(TransactionJournal $journal): bool
|
||||||
{
|
{
|
||||||
|
Log::debug(sprintf('handleTransactionJournal for journal %d', $journal->id));
|
||||||
$this->journal = $journal;
|
$this->journal = $journal;
|
||||||
// get all triggers:
|
// get all triggers:
|
||||||
$triggered = $this->triggered();
|
$triggered = $this->triggered();
|
||||||
@ -187,8 +189,10 @@ final class Processor
|
|||||||
foreach ($this->actions as $action) {
|
foreach ($this->actions as $action) {
|
||||||
/** @var ActionInterface $actionClass */
|
/** @var ActionInterface $actionClass */
|
||||||
$actionClass = ActionFactory::getAction($action);
|
$actionClass = ActionFactory::getAction($action);
|
||||||
|
Log::debug(sprintf('Fire action %s on journal #%d', $actionClass, $this->journal->id));
|
||||||
$actionClass->act($this->journal);
|
$actionClass->act($this->journal);
|
||||||
if ($action->stop_processing) {
|
if ($action->stop_processing) {
|
||||||
|
Log::debug('Stop processing now and break.');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user