Files
ai-stylegallery/app/Api/Plugins/LoggablePlugin.php

29 lines
694 B
PHP

<?php
namespace App\Api\Plugins;
use Illuminate\Support\Facades\Log;
trait LoggablePlugin
{
protected function logInfo(string $message, array $context = []): void
{
Log::channel('plugins')->info($message, $context);
}
protected function logWarning(string $message, array $context = []): void
{
Log::channel('plugins')->warning($message, $context);
}
protected function logError(string $message, array $context = []): void
{
Log::channel('plugins')->error($message, $context);
}
protected function logDebug(string $message, array $context = []): void
{
Log::channel('plugins')->debug($message, $context);
}
}