Refactor code to use loggy() function for server storage check logging
This commit is contained in:
parent
50519a86a9
commit
29ad965656
2 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,6 @@
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
|
|
||||||
class ServerStorageCheckJob implements ShouldBeEncrypted, ShouldQueue
|
class ServerStorageCheckJob implements ShouldBeEncrypted, ShouldQueue
|
||||||
|
|
@ -39,7 +38,7 @@ public function handle()
|
||||||
|
|
||||||
if (is_null($this->percentage)) {
|
if (is_null($this->percentage)) {
|
||||||
$this->percentage = $this->server->storageCheck();
|
$this->percentage = $this->server->storageCheck();
|
||||||
Log::info('Server storage check percentage: '.$this->percentage);
|
loggy('Server storage check percentage: '.$this->percentage);
|
||||||
}
|
}
|
||||||
if (! $this->percentage) {
|
if (! $this->percentage) {
|
||||||
return 'No percentage could be retrieved.';
|
return 'No percentage could be retrieved.';
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
use App\Notifications\Internal\GeneralNotification;
|
use App\Notifications\Internal\GeneralNotification;
|
||||||
use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
|
use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
|
||||||
use Illuminate\Database\UniqueConstraintViolationException;
|
use Illuminate\Database\UniqueConstraintViolationException;
|
||||||
|
use Illuminate\Log\LogManager;
|
||||||
use Illuminate\Mail\Message;
|
use Illuminate\Mail\Message;
|
||||||
use Illuminate\Notifications\Messages\MailMessage;
|
use Illuminate\Notifications\Messages\MailMessage;
|
||||||
use Illuminate\Process\Pool;
|
use Illuminate\Process\Pool;
|
||||||
|
|
@ -4013,7 +4014,7 @@ function loadConfigFromGit(string $repository, string $branch, string $base_dire
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loggy($message = null, array $context = [])
|
function loggy($message = null, array $context = []): LogManager
|
||||||
{
|
{
|
||||||
if (! isDev()) {
|
if (! isDev()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue