mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
Revert "Add monolog"
This commit is contained in:
parent
13e4dd0163
commit
2f49c4a058
18 changed files with 165 additions and 698 deletions
33
src/App.php
33
src/App.php
|
@ -8,10 +8,8 @@ use Detection\MobileDetect;
|
|||
use DOMDocument;
|
||||
use DOMXPath;
|
||||
use Exception;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -108,11 +106,6 @@ class App
|
|||
*/
|
||||
public $mobileDetect;
|
||||
|
||||
/**
|
||||
* @var LoggerInterface The current logger of this App
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* Register a stylesheet file path to be included in the <head> tag of every page.
|
||||
* Inclusion is done in App->initHead().
|
||||
|
@ -153,16 +146,13 @@ class App
|
|||
/**
|
||||
* @brief App constructor.
|
||||
*
|
||||
* @param string $basePath Path to the app base folder
|
||||
* @param LoggerInterface $logger Logger of this application
|
||||
* @param bool $isBackend Whether it is used for backend or frontend (Default true=backend)
|
||||
* @param string $basePath Path to the app base folder
|
||||
* @param bool $isBackend Whether it is used for backend or frontend (Default true=backend)
|
||||
*
|
||||
* @throws Exception if the Basepath is not usable
|
||||
*/
|
||||
public function __construct($basePath, LoggerInterface $logger, $isBackend = true)
|
||||
public function __construct($basePath, $isBackend = true)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
|
||||
if (!static::isDirectoryUsable($basePath, false)) {
|
||||
throw new Exception('Basepath ' . $basePath . ' isn\'t usable.');
|
||||
}
|
||||
|
@ -311,21 +301,6 @@ class App
|
|||
return $this->mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Logger of the Application
|
||||
*
|
||||
* @return LoggerInterface The Logger
|
||||
* @throws InternalServerErrorException when the logger isn't created
|
||||
*/
|
||||
public function getLogger()
|
||||
{
|
||||
if (empty($this->logger)) {
|
||||
throw new InternalServerErrorException('Logger of the Application is not defined');
|
||||
}
|
||||
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the whole app instance
|
||||
*/
|
||||
|
@ -353,8 +328,6 @@ class App
|
|||
Core\L10n::init();
|
||||
|
||||
$this->process_id = Core\System::processID('log');
|
||||
|
||||
Core\Logger::setLogger($this->logger);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue