Replace log.

This commit is contained in:
James Cole
2025-10-05 12:49:39 +02:00
parent 362705ec71
commit 072212c112
39 changed files with 194 additions and 195 deletions

View File

@@ -31,6 +31,7 @@ use Illuminate\Console\Command;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use JsonException;
use stdClass;
@@ -96,7 +97,7 @@ class RemovesDatabaseDecryption extends Command
try {
$configVar = app('fireflyconfig')->get($configName, false);
} catch (FireflyException $e) {
app('log')->error($e->getMessage());
Log::error($e->getMessage());
}
if (null !== $configVar) {
return (bool) $configVar->data;
@@ -129,8 +130,8 @@ class RemovesDatabaseDecryption extends Command
} catch (FireflyException $e) {
$message = sprintf('Could not decrypt field "%s" in row #%d of table "%s": %s', $field, $id, $table, $e->getMessage());
$this->friendlyError($message);
app('log')->error($message);
app('log')->error($e->getTraceAsString());
Log::error($message);
Log::error($e->getTraceAsString());
}
// A separate routine for preferences table:
@@ -175,9 +176,9 @@ class RemovesDatabaseDecryption extends Command
} catch (JsonException $e) {
$message = sprintf('Could not JSON decode preference row #%d: %s. This does not have to be a problem.', $id, $e->getMessage());
$this->friendlyError($message);
app('log')->warning($message);
app('log')->warning($value);
app('log')->warning($e->getTraceAsString());
Log::warning($message);
Log::warning($value);
Log::warning($e->getTraceAsString());
return;
}