From 712e6287553d6ff19b4ee5817e8a4427e2e98ff1 Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Sun, 17 Mar 2024 15:09:42 +0300 Subject: [PATCH] Add logger for component --- .../administrator/src/Extension/Component.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/com_oauthserver/administrator/src/Extension/Component.php b/com_oauthserver/administrator/src/Extension/Component.php index 314205a..f621951 100644 --- a/com_oauthserver/administrator/src/Extension/Component.php +++ b/com_oauthserver/administrator/src/Extension/Component.php @@ -16,6 +16,7 @@ use Joomla\CMS\Component\Router\RouterServiceTrait; use Joomla\CMS\Extension\BootableExtensionInterface; use Joomla\CMS\Extension\MVCComponent; use Joomla\CMS\HTML\HTMLRegistryAwareTrait; +use Joomla\CMS\Log\Log; use Joomla\CMS\Plugin\PluginHelper; use Psr\Container\ContainerInterface; use Webmasterskaya\Component\OauthServer\Administrator\Helper\ComponentHelper; @@ -44,5 +45,13 @@ class Component extends MVCComponent implements ComponentHelper::registerComponentDependencies(); PluginHelper::importPlugin('oauthserver'); + + Log::addLogger( + [ + 'text_file' => 'com_oauthserver.log.php' + ], + Log::ALL, + ['com_oauthserver'] + ); } }