mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge branch 'master' into PHRAS-2529_enable_debug_depending_on_environment
This commit is contained in:
@@ -56,7 +56,8 @@ jobs:
|
|||||||
# This is based on your 1.0 configuration file or project settings
|
# This is based on your 1.0 configuration file or project settings
|
||||||
- run: node -v
|
- run: node -v
|
||||||
- run: npm -v
|
- run: npm -v
|
||||||
- run: npm install
|
- run: npm install -g yarn
|
||||||
|
- run: /opt/circleci/nodejs/v10.12.0/bin/yarn install
|
||||||
- run: if [[ ! -e elasticsearch-2.3.3 ]]; then wget --no-check-certificate https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.3.3.tar.gz && tar -xvf elasticsearch-2.3.3.tar.gz && elasticsearch-2.3.3/bin/plugin install analysis-icu; fi
|
- run: if [[ ! -e elasticsearch-2.3.3 ]]; then wget --no-check-certificate https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.3.3.tar.gz && tar -xvf elasticsearch-2.3.3.tar.gz && elasticsearch-2.3.3/bin/plugin install analysis-icu; fi
|
||||||
- run:
|
- run:
|
||||||
command: elasticsearch-2.3.3/bin/elasticsearch
|
command: elasticsearch-2.3.3/bin/elasticsearch
|
||||||
|
@@ -92,9 +92,12 @@ use Alchemy\WorkerProvider\WorkerServiceProvider;
|
|||||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||||
use MediaVorus\Media\MediaInterface;
|
use MediaVorus\Media\MediaInterface;
|
||||||
use MediaVorus\MediaVorus;
|
use MediaVorus\MediaVorus;
|
||||||
|
use Monolog\Handler\ErrorLogHandler;
|
||||||
use Monolog\Handler\RotatingFileHandler;
|
use Monolog\Handler\RotatingFileHandler;
|
||||||
|
use Monolog\Handler\StreamHandler;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Neutron\ReCaptcha\ReCaptchaServiceProvider;
|
use Neutron\ReCaptcha\ReCaptchaServiceProvider;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
use Silex\Application as SilexApplication;
|
use Silex\Application as SilexApplication;
|
||||||
use Silex\Application\TranslationTrait;
|
use Silex\Application\TranslationTrait;
|
||||||
use Silex\Application\UrlGeneratorTrait;
|
use Silex\Application\UrlGeneratorTrait;
|
||||||
@@ -253,6 +256,23 @@ class Application extends SilexApplication
|
|||||||
$this->register(new OrderServiceProvider());
|
$this->register(new OrderServiceProvider());
|
||||||
$this->register(new WebhookServiceProvider());
|
$this->register(new WebhookServiceProvider());
|
||||||
|
|
||||||
|
$this['monolog'] = $this->share(
|
||||||
|
$this->extend('monolog', function (LoggerInterface $logger, Application $app) {
|
||||||
|
|
||||||
|
$logger->pushHandler(new ErrorLogHandler(
|
||||||
|
ErrorLogHandler::SAPI,
|
||||||
|
Logger::ERROR
|
||||||
|
));
|
||||||
|
|
||||||
|
$logger->pushHandler(new StreamHandler(
|
||||||
|
fopen('php://stderr', 'w'),
|
||||||
|
Logger::ERROR
|
||||||
|
));
|
||||||
|
|
||||||
|
return $logger;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
$this['phraseanet.exception_handler'] = $this->share(function ($app) {
|
$this['phraseanet.exception_handler'] = $this->share(function ($app) {
|
||||||
/** @var PhraseaExceptionHandler $handler */
|
/** @var PhraseaExceptionHandler $handler */
|
||||||
$handler = PhraseaExceptionHandler::register($app['debug']);
|
$handler = PhraseaExceptionHandler::register($app['debug']);
|
||||||
|
Reference in New Issue
Block a user