SolrLogger
in package
Class SolrLogger
Log information from Solr to the CMS for reference
Table of Contents
Properties
Methods
- __construct() : mixed
- SolrLogger constructor.
- getClient() : Client
- Return the Guzzle Client
- getOptions() : array<string|int, mixed>
- Get the options for Guzzle
- logMessage() : void
- Log the given message and dump it out.
- saveSolrLog() : void
- Save the latest Solr errors to the log
- setClient() : SolrLogger
- Set the Guzzle client
- setOptions() : void
- Set custom options for Guzzle
- findOrCreateLog() : void
- Attempt to find, otherwise create, a log object
Properties
$client
protected
Client
$client
Guzzle base client to communicate with Solr
$options
protected
array<string|int, mixed>
$options
= []
Default options
Methods
__construct()
SolrLogger constructor.
public
__construct([null|Countable $handler = null ]) : mixed
Parameters
- $handler : null|Countable = null
getClient()
Return the Guzzle Client
public
getClient() : Client
Return values
ClientgetOptions()
Get the options for Guzzle
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>logMessage()
Log the given message and dump it out.
public
static logMessage(string $type, string $message) : void
Also boot the Log to get the latest errors from Solr
Parameters
- $type : string
- $message : string
Tags
saveSolrLog()
Save the latest Solr errors to the log
public
saveSolrLog([string $type = 'Query' ]) : void
Parameters
- $type : string = 'Query'
Tags
setClient()
Set the Guzzle client
public
setClient(Client $client) : SolrLogger
Parameters
- $client : Client
Return values
SolrLoggersetOptions()
Set custom options for Guzzle
public
setOptions(array<string|int, mixed> $options) : void
Parameters
- $options : array<string|int, mixed>
findOrCreateLog()
Attempt to find, otherwise create, a log object
private
findOrCreateLog( $type, array<string|int, mixed> $filter, $error) : void