mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add debug messages.
This commit is contained in:
@@ -12,6 +12,7 @@ namespace FireflyIII\Events;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalStored
|
||||
@@ -34,6 +35,7 @@ class TransactionJournalStored extends Event
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal, int $piggyBankId)
|
||||
{
|
||||
Log::debug('Created new TransactionJournalStored.');
|
||||
//
|
||||
$this->journal = $journal;
|
||||
$this->piggyBankId = $piggyBankId;
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace FireflyIII\Events;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalUpdated
|
||||
@@ -25,6 +26,7 @@ class TransactionJournalUpdated extends Event
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal)
|
||||
{
|
||||
Log::debug('Created new TransactionJournalUpdated');
|
||||
//
|
||||
$this->journal = $journal;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ class FireRulesForStore
|
||||
*/
|
||||
public function handle(TransactionJournalStored $event): bool
|
||||
{
|
||||
Log::debug('Now running FireRulesForStore because TransactionJournalStored fired.');
|
||||
// get all the user's rule groups, with the rules, order by 'order'.
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
@@ -34,6 +34,7 @@ class FireRulesForUpdate
|
||||
*/
|
||||
public function handle(TransactionJournalUpdated $event): bool
|
||||
{
|
||||
Log::debug('Now running FireRulesForUpdate because TransactionJournalUpdated fired.');
|
||||
// get all the user's rule groups, with the rules, order by 'order'.
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
@@ -20,6 +20,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Input;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Response;
|
||||
use Session;
|
||||
@@ -307,6 +308,7 @@ class TransactionController extends Controller
|
||||
Session::flash('info', $att->getMessages()->get('attachments'));
|
||||
}
|
||||
|
||||
Log::debug('Triggered TransactionJournalStored with transaction journal #' . $journal->id.' and piggy #' . intval($request->get('piggy_bank_id')));
|
||||
event(new TransactionJournalStored($journal, intval($request->get('piggy_bank_id'))));
|
||||
|
||||
Session::flash('success', strval(trans('firefly.stored_journal', ['description' => e($journal->description)])));
|
||||
|
||||
@@ -138,11 +138,13 @@ final class Processor
|
||||
$triggered = $this->triggered();
|
||||
if ($triggered) {
|
||||
if ($this->actions->count() > 0) {
|
||||
Log::debug('Journal #' . $journal->id . ' triggered, actions executed.');
|
||||
$this->actions();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Log::debug('Journal #' . $journal->id . ' not triggered, did nothing.');
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user