Skip to content

Commit

Permalink
[BUGFIX] Initialize logger in Embedded3dViewer Middleware (#1341)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer authored Sep 20, 2024
1 parent 3e31b86 commit 61a64e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/Middleware/Embedded3dViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Configuration\Loader\YamlFileLoader;
use TYPO3\CMS\Core\Exception;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Resource\Folder;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Resource\StorageRepository;
Expand All @@ -35,7 +37,7 @@
* @subpackage dlf
* @access public
*/
class Embedded3dViewer implements MiddlewareInterface
class Embedded3dViewer implements LoggerAwareInterface, MiddlewareInterface
{
use LoggerAwareTrait;

Expand Down Expand Up @@ -63,6 +65,8 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
return $response;
}

$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);

if (empty($parameters['model'])) {
return $this->warningResponse('Model url is missing.', $request);
}
Expand Down

0 comments on commit 61a64e0

Please sign in to comment.