mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add some debug info.
This commit is contained in:
parent
6381d04e2b
commit
c08d44ea48
@ -39,6 +39,7 @@ use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
|||||||
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
|
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BudgetController
|
* Class BudgetController
|
||||||
@ -177,6 +178,7 @@ class BudgetController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function processExpenses(int $budgetId, array $array, Carbon $start, Carbon $end): array
|
private function processExpenses(int $budgetId, array $array, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
$return = [];
|
$return = [];
|
||||||
|
|
||||||
@ -258,6 +260,7 @@ class BudgetController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function processLimit(Budget $budget, BudgetLimit $limit): array
|
private function processLimit(Budget $budget, BudgetLimit $limit): array
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$end = clone $limit->end_date;
|
$end = clone $limit->end_date;
|
||||||
$end->endOfDay();
|
$end->endOfDay();
|
||||||
$spent = $this->opsRepository->listExpenses($limit->start_date, $end, null, new Collection([$budget]));
|
$spent = $this->opsRepository->listExpenses($limit->start_date, $end, null, new Collection([$budget]));
|
||||||
|
@ -37,6 +37,7 @@ use FireflyIII\Support\Http\Api\CleansChartData;
|
|||||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||||
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
|
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BudgetController
|
* Class BudgetController
|
||||||
@ -76,6 +77,7 @@ class CategoryController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function dashboard(DateRequest $request): JsonResponse
|
public function dashboard(DateRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
/** @var Carbon $start */
|
/** @var Carbon $start */
|
||||||
$start = $this->parameters->get('start');
|
$start = $this->parameters->get('start');
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ use FireflyIII\Support\Http\Api\SummaryBalanceGrouped;
|
|||||||
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
|
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BasicController
|
* Class BasicController
|
||||||
@ -244,6 +245,7 @@ class BasicController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function getLeftToSpendInfo(Carbon $start, Carbon $end): array
|
private function getLeftToSpendInfo(Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
app('log')->debug('Now in getLeftToSpendInfo');
|
app('log')->debug('Now in getLeftToSpendInfo');
|
||||||
$return = [];
|
$return = [];
|
||||||
$today = today(config('app.timezone'));
|
$today = today(config('app.timezone'));
|
||||||
|
@ -32,6 +32,7 @@ use FireflyIII\Support\Cronjobs\BillWarningCronjob;
|
|||||||
use FireflyIII\Support\Cronjobs\ExchangeRatesCronjob;
|
use FireflyIII\Support\Cronjobs\ExchangeRatesCronjob;
|
||||||
use FireflyIII\Support\Cronjobs\RecurringCronjob;
|
use FireflyIII\Support\Cronjobs\RecurringCronjob;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Cron
|
* Class Cron
|
||||||
@ -103,6 +104,7 @@ class Cron extends Command
|
|||||||
|
|
||||||
private function exchangeRatesCronJob(bool $force, ?Carbon $date): void
|
private function exchangeRatesCronJob(bool $force, ?Carbon $date): void
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$exchangeRates = new ExchangeRatesCronjob();
|
$exchangeRates = new ExchangeRatesCronjob();
|
||||||
$exchangeRates->setForce($force);
|
$exchangeRates->setForce($force);
|
||||||
// set date in cron job:
|
// set date in cron job:
|
||||||
|
@ -220,7 +220,7 @@ class UserEventHandler
|
|||||||
|
|
||||||
public function sendAdminRegistrationNotification(RegisteredUser $event): void
|
public function sendAdminRegistrationNotification(RegisteredUser $event): void
|
||||||
{
|
{
|
||||||
$sendMail = (bool)app('fireflyconfig')->get('notification_admin_new_reg', true)->data;
|
$sendMail = (bool) app('fireflyconfig')->get('notification_admin_new_reg', true)->data;
|
||||||
if ($sendMail) {
|
if ($sendMail) {
|
||||||
/** @var UserRepositoryInterface $repository */
|
/** @var UserRepositoryInterface $repository */
|
||||||
$repository = app(UserRepositoryInterface::class);
|
$repository = app(UserRepositoryInterface::class);
|
||||||
@ -285,7 +285,7 @@ class UserEventHandler
|
|||||||
$oldEmail = $event->oldEmail;
|
$oldEmail = $event->oldEmail;
|
||||||
$user = $event->user;
|
$user = $event->user;
|
||||||
$token = app('preferences')->getForUser($user, 'email_change_undo_token', 'invalid');
|
$token = app('preferences')->getForUser($user, 'email_change_undo_token', 'invalid');
|
||||||
$hashed = hash('sha256', sprintf('%s%s', (string)config('app.key'), $oldEmail));
|
$hashed = hash('sha256', sprintf('%s%s', (string) config('app.key'), $oldEmail));
|
||||||
$url = route('profile.undo-email-change', [$token->data, $hashed]);
|
$url = route('profile.undo-email-change', [$token->data, $hashed]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -347,7 +347,7 @@ class UserEventHandler
|
|||||||
*/
|
*/
|
||||||
public function sendRegistrationMail(RegisteredUser $event): void
|
public function sendRegistrationMail(RegisteredUser $event): void
|
||||||
{
|
{
|
||||||
$sendMail = (bool)app('fireflyconfig')->get('notification_user_new_reg', true)->data;
|
$sendMail = (bool) app('fireflyconfig')->get('notification_user_new_reg', true)->data;
|
||||||
if ($sendMail) {
|
if ($sendMail) {
|
||||||
try {
|
try {
|
||||||
Notification::send($event->user, new UserRegistrationNotification());
|
Notification::send($event->user, new UserRegistrationNotification());
|
||||||
|
@ -36,6 +36,7 @@ use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
|||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Contracts\Auth\Authenticatable;
|
use Illuminate\Contracts\Auth\Authenticatable;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class can handle both request with and without a user group and will return the appropriate repository when
|
* This class can handle both request with and without a user group and will return the appropriate repository when
|
||||||
@ -72,7 +73,7 @@ class NetWorth implements NetWorthInterface
|
|||||||
return $cache->get();
|
return $cache->get();
|
||||||
}
|
}
|
||||||
app('log')->debug(sprintf('Now in byAccounts("%s", "%s")', $ids, $date->format('Y-m-d')));
|
app('log')->debug(sprintf('Now in byAccounts("%s", "%s")', $ids, $date->format('Y-m-d')));
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$default = app('amount')->getDefaultCurrency();
|
$default = app('amount')->getDefaultCurrency();
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ use FireflyIII\Support\CacheProperties;
|
|||||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||||
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BillRepository
|
* Class BillRepository
|
||||||
@ -66,6 +67,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
|
|
||||||
public function sumPaidInRange(Carbon $start, Carbon $end): array
|
public function sumPaidInRange(Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$bills = $this->getActiveBills();
|
$bills = $this->getActiveBills();
|
||||||
$default = app('amount')->getDefaultCurrency();
|
$default = app('amount')->getDefaultCurrency();
|
||||||
$return = [];
|
$return = [];
|
||||||
@ -134,6 +136,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
|
|
||||||
public function sumUnpaidInRange(Carbon $start, Carbon $end): array
|
public function sumUnpaidInRange(Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$bills = $this->getActiveBills();
|
$bills = $this->getActiveBills();
|
||||||
$return = [];
|
$return = [];
|
||||||
$default = app('amount')->getDefaultCurrency();
|
$default = app('amount')->getDefaultCurrency();
|
||||||
|
@ -28,6 +28,7 @@ use Carbon\Carbon;
|
|||||||
use FireflyIII\Models\AvailableBudget;
|
use FireflyIII\Models\AvailableBudget;
|
||||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||||
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AvailableBudgetRepository
|
* Class AvailableBudgetRepository
|
||||||
@ -38,6 +39,7 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
|
|||||||
|
|
||||||
public function getAvailableBudgetWithCurrency(Carbon $start, Carbon $end): array
|
public function getAvailableBudgetWithCurrency(Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$return = [];
|
$return = [];
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
$default = app('amount')->getDefaultCurrency();
|
$default = app('amount')->getDefaultCurrency();
|
||||||
|
@ -28,6 +28,7 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Models\TransactionType;
|
use FireflyIII\Models\TransactionType;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AccountBalanceGrouped
|
* Class AccountBalanceGrouped
|
||||||
@ -117,6 +118,7 @@ class AccountBalanceGrouped
|
|||||||
*/
|
*/
|
||||||
public function groupByCurrencyAndPeriod(): void
|
public function groupByCurrencyAndPeriod(): void
|
||||||
{
|
{
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
|
|
||||||
// loop. group by currency and by period.
|
// loop. group by currency and by period.
|
||||||
|
@ -25,6 +25,7 @@ namespace FireflyIII\Support\Http\Api;
|
|||||||
|
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class SummaryBalanceGrouped
|
class SummaryBalanceGrouped
|
||||||
{
|
{
|
||||||
@ -44,7 +45,8 @@ class SummaryBalanceGrouped
|
|||||||
|
|
||||||
public function groupTransactions(string $key, array $journals): void
|
public function groupTransactions(string $key, array $journals): void
|
||||||
{
|
{
|
||||||
\Log::debug(sprintf('Now in groupTransactions with key "%s" and %d journal(s)', $key, count($journals)));
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
|
Log::debug(sprintf('Now in groupTransactions with key "%s" and %d journal(s)', $key, count($journals)));
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
$this->keys[] = $key;
|
$this->keys[] = $key;
|
||||||
$multiplier = 'income' === $key ? '-1' : '1';
|
$multiplier = 'income' === $key ? '-1' : '1';
|
||||||
|
@ -239,7 +239,7 @@ class Steam
|
|||||||
$balances[$formatted] = $startBalance;
|
$balances[$formatted] = $startBalance;
|
||||||
|
|
||||||
app('log')->debug(sprintf('Start balance on %s is %s', $formatted, $startBalance));
|
app('log')->debug(sprintf('Start balance on %s is %s', $formatted, $startBalance));
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
|
|
||||||
// not sure why this is happening:
|
// not sure why this is happening:
|
||||||
@ -422,6 +422,7 @@ class Steam
|
|||||||
// need to convert the others. All sets use the "amount" value as their base (that's easy)
|
// need to convert the others. All sets use the "amount" value as their base (that's easy)
|
||||||
// but we need to convert each transaction separately because the date difference may
|
// but we need to convert each transaction separately because the date difference may
|
||||||
// incur huge currency changes.
|
// incur huge currency changes.
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$start = clone $date;
|
$start = clone $date;
|
||||||
$end = clone $date;
|
$end = clone $date;
|
||||||
$converter = new ExchangeRateConverter();
|
$converter = new ExchangeRateConverter();
|
||||||
|
@ -34,6 +34,7 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BillTransformer
|
* Class BillTransformer
|
||||||
@ -92,6 +93,7 @@ class BillTransformer extends AbstractTransformer
|
|||||||
'object_group_order' => $order,
|
'object_group_order' => $order,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$this->default = app('amount')->getDefaultCurrency();
|
$this->default = app('amount')->getDefaultCurrency();
|
||||||
$this->converter = new ExchangeRateConverter();
|
$this->converter = new ExchangeRateConverter();
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PiggyBankTransformer
|
* Class PiggyBankTransformer
|
||||||
@ -131,6 +132,7 @@ class PiggyBankTransformer extends AbstractTransformer
|
|||||||
$this->notes[$id] = $note;
|
$this->notes[$id] = $note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$this->default = app('amount')->getDefaultCurrencyByUserGroup(auth()->user()->userGroup);
|
$this->default = app('amount')->getDefaultCurrencyByUserGroup(auth()->user()->userGroup);
|
||||||
$this->converter = new ExchangeRateConverter();
|
$this->converter = new ExchangeRateConverter();
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
|||||||
use FireflyIII\Support\NullArrayObject;
|
use FireflyIII\Support\NullArrayObject;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TransactionGroupTransformer
|
* Class TransactionGroupTransformer
|
||||||
@ -102,6 +103,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create converter
|
// create converter
|
||||||
|
Log::info(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||||
$this->converter = new ExchangeRateConverter();
|
$this->converter = new ExchangeRateConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user