mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-06-28 07:29:21 +02:00
SS 4.0 - Upgrade Combinations array and Logging
This commit is contained in:
parent
6fb5736ef3
commit
fa7a23a6d2
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Utils;
|
namespace SilverStripe\FullTextSearch\Utils;
|
||||||
|
|
||||||
use Iterator;
|
use Iterator;
|
||||||
|
|
||||||
class CombinationsArrayIterator implements Iterator
|
class CombinationsArrayIterator implements Iterator
|
||||||
{
|
{
|
||||||
protected $arrays;
|
protected $arrays;
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Utils\Logging;
|
namespace SilverStripe\FullTextSearch\Utils\Logging;
|
||||||
|
|
||||||
use Monolog\Formatter\FormatterInterface;
|
use Monolog\Formatter\FormatterInterface;
|
||||||
use Monolog\Formatter\LineFormatter;
|
use Monolog\Formatter\LineFormatter;
|
||||||
use Monolog\Handler\HandlerInterface;
|
use Monolog\Handler\HandlerInterface;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
use SilverStripe\Control\Director;
|
||||||
|
use SilverStripe\Core\Injector\Injector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides logging based on monolog
|
* Provides logging based on monolog
|
||||||
|
@ -97,7 +101,7 @@ class MonologFactory implements SearchLogFactory
|
||||||
protected function getJobHandler($job)
|
protected function getJobHandler($job)
|
||||||
{
|
{
|
||||||
return Injector::inst()->createWithArgs(
|
return Injector::inst()->createWithArgs(
|
||||||
'QueuedJobLogHandler',
|
'SilverStripe\FullTextSearch\Utils\Logging\QueuedJobLogHandler',
|
||||||
array($job, Logger::INFO)
|
array($job, Logger::INFO)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Utils\Logging;
|
namespace SilverStripe\FullTextSearch\Utils\Logging;
|
||||||
|
|
||||||
use Monolog\Handler\AbstractProcessingHandler;
|
use Monolog\Handler\AbstractProcessingHandler;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
if (!interface_exists('QueuedJob')) {
|
if (!interface_exists('SilverStripe\QueuedJobs\Services\QueuedJob')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use SilverStripe\QueuedJobs\Services\QueuedJob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for logging events into QueuedJob message data
|
* Handler for logging events into QueuedJob message data
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Utils\Logging;
|
namespace SilverStripe\FullTextSearch\Utils\Logging;
|
||||||
|
|
||||||
use Psr\Log;
|
use Psr\Log;
|
||||||
|
|
||||||
interface SearchLogFactory
|
interface SearchLogFactory
|
||||||
|
|
Loading…
Reference in New Issue
Block a user