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