Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!!!FEATURE: Add virtual object configurations for framework loggers #2134

Merged
merged 19 commits into from Nov 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Neos.Flow/Classes/Command/DoctrineCommandController.php
Expand Up @@ -57,6 +57,7 @@ class DoctrineCommandController extends CommandController
protected $throwableStorage;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
Expand Up @@ -26,7 +26,7 @@ class SecurityEntryPointComponent implements ComponentInterface
protected $securityContext;

/**
* @Flow\Inject
* @Flow\Inject(name="Neos.Flow:SecurityLogger")
* @var LoggerInterface
*/
protected $securityLogger;
Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Http/ContentStream.php
Expand Up @@ -34,7 +34,7 @@ class ContentStream implements StreamInterface
protected $stream;

/**
* @Flow\Inject
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
3 changes: 1 addition & 2 deletions Neos.Flow/Classes/I18n/Xliff/Model/FileAdapter.php
Expand Up @@ -33,12 +33,11 @@
class FileAdapter
{
/**
* @Flow\Inject
* @Flow\Inject(name="Neos.Flow:I18nLogger")
* @var LoggerInterface
*/
protected $i18nLogger;


/**
* @var array
*/
Expand Down
3 changes: 1 addition & 2 deletions Neos.Flow/Classes/I18n/Xliff/Service/XliffReader.php
Expand Up @@ -23,12 +23,11 @@
class XliffReader
{
/**
* @Flow\Inject
* @Flow\Inject(name="Neos.Flow:I18nLogger")
* @var LoggerInterface
*/
protected $i18nLogger;


/**
* @param string $sourcePath
* @param callable $iterator
Expand Down
22 changes: 0 additions & 22 deletions Neos.Flow/Classes/Log/PsrSecurityLoggerInterface.php

This file was deleted.

23 changes: 0 additions & 23 deletions Neos.Flow/Classes/Log/PsrSystemLoggerInterface.php

This file was deleted.

1 change: 1 addition & 0 deletions Neos.Flow/Classes/Mvc/Routing/Router.php
Expand Up @@ -33,6 +33,7 @@
class Router implements RouterInterface
{
/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
1 change: 1 addition & 0 deletions Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php
Expand Up @@ -52,6 +52,7 @@ class RouterCachingService

/**
* @var LoggerInterface
* @Flow\Inject(name="Neos.Flow:SystemLogger")
*/
protected $logger;

Expand Down
Expand Up @@ -36,6 +36,7 @@
class PersistenceManager extends AbstractPersistenceManager
{
/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
1 change: 1 addition & 0 deletions Neos.Flow/Classes/Persistence/Doctrine/Query.php
Expand Up @@ -35,6 +35,7 @@ class Query implements QueryInterface
protected $entityClassName;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
Expand Up @@ -40,6 +40,7 @@ class MessageCollector
protected $messages;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
1 change: 1 addition & 0 deletions Neos.Flow/Classes/ResourceManagement/ResourceManager.php
Expand Up @@ -47,6 +47,7 @@ class ResourceManager
protected $objectManager;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
Expand Up @@ -113,6 +113,7 @@ class ResourceTypeConverter extends AbstractTypeConverter
protected $persistenceManager;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
Expand Up @@ -89,6 +89,7 @@ class FileSystemTarget implements TargetInterface
protected $resourceRepository;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
6 changes: 3 additions & 3 deletions Neos.Flow/Classes/Security/Aspect/LoggingAspect.php
Expand Up @@ -15,10 +15,10 @@

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Aop\JoinPointInterface;
use Neos\Flow\Log\PsrSecurityLoggerInterface;
use Neos\Flow\Security\Authentication\AuthenticationManagerInterface;
use Neos\Flow\Security\Authentication\TokenInterface;
use Neos\Flow\Security\Exception\NoTokensAuthenticatedException;
use Psr\Log\LoggerInterface;

/**
* An aspect which centralizes the logging of security relevant actions.
Expand All @@ -29,8 +29,8 @@
class LoggingAspect
{
/**
* @var PsrSecurityLoggerInterface
* @Flow\Inject
* @Flow\Inject(name="Neos.Flow:SecurityLogger")
* @var LoggerInterface
*/
protected $securityLogger;

Expand Down
6 changes: 3 additions & 3 deletions Neos.Flow/Classes/Security/Context.php
Expand Up @@ -13,7 +13,6 @@

use Neos\Flow\Annotations as Flow;
use Neos\Cache\CacheAwareInterface;
use Neos\Flow\Log\PsrSecurityLoggerInterface;
use Neos\Flow\Log\Utility\LogEnvironment;
use Neos\Flow\ObjectManagement\ObjectManagerInterface;
use Neos\Flow\Security\Authentication\Token\SessionlessTokenInterface;
Expand All @@ -24,6 +23,7 @@
use Neos\Flow\Session\SessionManagerInterface;
use Neos\Flow\Utility\Algorithms;
use Neos\Utility\TypeHandling;
use Psr\Log\LoggerInterface;

/**
* This is the default implementation of a security context, which holds current
Expand Down Expand Up @@ -171,8 +171,8 @@ class Context
protected $sessionManager;

/**
* @Flow\Inject
* @var PsrSecurityLoggerInterface
* @Flow\Inject(name="Neos.Flow:SecurityLogger")
* @var LoggerInterface
*/
protected $securityLogger;

Expand Down
Expand Up @@ -61,6 +61,7 @@ class CsrfProtection implements RequestPatternInterface
protected $policyService;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
1 change: 1 addition & 0 deletions Neos.Flow/Classes/Session/Aspect/LoggingAspect.php
Expand Up @@ -25,6 +25,7 @@
class LoggingAspect
{
/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down
1 change: 1 addition & 0 deletions Neos.Flow/Classes/Session/Session.php
Expand Up @@ -55,6 +55,7 @@ class Session implements CookieEnabledInterface
protected $objectManager;

/**
* @Flow\Inject(name="Neos.Flow:SystemLogger")
* @var LoggerInterface
*/
protected $logger;
Expand Down