Replace references to log service.

This commit is contained in:
James Cole
2025-11-02 14:48:36 +01:00
parent ae767fc90d
commit 7743d16ea1
19 changed files with 60 additions and 47 deletions

View File

@@ -130,7 +130,7 @@ trait AccountCollection
$this->query->whereNotIn('source.account_id', $accountIds);
$this->query->whereNotIn('destination.account_id', $accountIds);
app('log')->debug(sprintf('GroupCollector: excludeAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: excludeAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -145,7 +145,7 @@ trait AccountCollection
$accountIds = $accounts->pluck('id')->toArray();
$this->query->whereNotIn('destination.account_id', $accountIds);
app('log')->debug(sprintf('GroupCollector: excludeDestinationAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: excludeDestinationAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -160,7 +160,7 @@ trait AccountCollection
$accountIds = $accounts->pluck('id')->toArray();
$this->query->whereNotIn('source.account_id', $accountIds);
app('log')->debug(sprintf('GroupCollector: excludeSourceAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: excludeSourceAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -179,7 +179,7 @@ trait AccountCollection
$query->orWhereIn('destination.account_id', $accountIds);
}
);
// app('log')->debug(sprintf('GroupCollector: setAccounts: %s', implode(', ', $accountIds)));
// Log::debug(sprintf('GroupCollector: setAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -198,7 +198,7 @@ trait AccountCollection
$query->whereIn('destination.account_id', $accountIds);
}
);
app('log')->debug(sprintf('GroupCollector: setBothAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: setBothAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -213,7 +213,7 @@ trait AccountCollection
$accountIds = $accounts->pluck('id')->toArray();
$this->query->whereIn('destination.account_id', $accountIds);
app('log')->debug(sprintf('GroupCollector: setDestinationAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: setDestinationAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -232,7 +232,7 @@ trait AccountCollection
$query->whereNotIn('destination.account_id', $accountIds);
}
);
// app('log')->debug(sprintf('GroupCollector: setAccounts: %s', implode(', ', $accountIds)));
// Log::debug(sprintf('GroupCollector: setAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -247,7 +247,7 @@ trait AccountCollection
$accountIds = $accounts->pluck('id')->toArray();
$this->query->whereIn('source.account_id', $accountIds);
app('log')->debug(sprintf('GroupCollector: setSourceAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: setSourceAccounts: %s', implode(', ', $accountIds)));
}
return $this;
@@ -280,7 +280,7 @@ trait AccountCollection
}
);
app('log')->debug(sprintf('GroupCollector: setXorAccounts: %s', implode(', ', $accountIds)));
Log::debug(sprintf('GroupCollector: setXorAccounts: %s', implode(', ', $accountIds)));
}
return $this;

View File

@@ -29,7 +29,7 @@ use FireflyIII\Models\Attachment;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Support\Facades\Log;
/**
* Trait AttachmentCollection
*/
@@ -72,7 +72,7 @@ trait AttachmentCollection
*/
public function hasAttachments(): GroupCollectorInterface
{
app('log')->debug('Add filter on attachment ID.');
Log::debug('Add filter on attachment ID.');
$this->joinAttachmentTables();
$this->query->whereNotNull('attachments.attachable_id');
$this->query->whereNull('attachments.deleted_at');
@@ -510,7 +510,7 @@ trait AttachmentCollection
*/
public function hasNoAttachments(): GroupCollectorInterface
{
app('log')->debug('Add filter on no attachments.');
Log::debug('Add filter on no attachments.');
$this->joinAttachmentTables();
$this->query->where(static function (Builder $q1): void { // @phpstan-ignore-line