ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Monolog\Handler\LogEntriesHandler Class Reference
+ Inheritance diagram for Monolog\Handler\LogEntriesHandler:
+ Collaboration diagram for Monolog\Handler\LogEntriesHandler:

Public Member Functions

 __construct ($token, $useSSL=true, $level=Logger::DEBUG, $bubble=true, $host='data.logentries.com')
 
- Public Member Functions inherited from Monolog\Handler\SocketHandler
 __construct ($connectionString, $level=Logger::DEBUG, $bubble=true)
 
 close ()
 We will not close a PersistentSocket instance so it can be reused in other requests. More...
 
 closeSocket ()
 Close socket, if open. More...
 
 setPersistent ($persistent)
 Set socket connection to nbe persistent. More...
 
 setConnectionTimeout ($seconds)
 Set connection timeout. More...
 
 setTimeout ($seconds)
 Set write timeout. More...
 
 setWritingTimeout ($seconds)
 Set writing timeout. More...
 
 setChunkSize ($bytes)
 Set chunk size. More...
 
 getConnectionString ()
 Get current connection string. More...
 
 isPersistent ()
 Get persistent setting. More...
 
 getConnectionTimeout ()
 Get current connection timeout setting. More...
 
 getTimeout ()
 Get current in-transfer timeout. More...
 
 getWritingTimeout ()
 Get current local writing timeout. More...
 
 getChunkSize ()
 Get current chunk size. More...
 
 isConnected ()
 Check to see if the socket is currently available. More...
 
- Public Member Functions inherited from Monolog\Handler\AbstractProcessingHandler
 handle (array $record)
 {Handles a record.All records may be passed to this method, and the handler should discard those that it does not want to handle.The return value of this function controls the bubbling process of the handler stack. Unless the bubbling is interrupted (by returning true), the Logger class will keep on calling further handlers in the stack with a given log record.
Parameters
array$recordThe record to handle
Returns
bool true means that this handler handled the record, and that bubbling is not permitted. false means the record was either not processed or that this handler allows bubbling.
} More...
 
- Public Member Functions inherited from Monolog\Handler\AbstractHandler
 __construct ($level=Logger::DEBUG, $bubble=true)
 
 isHandling (array $record)
 {Checks whether the given record will be handled by this handler.This is mostly done for performance reasons, to avoid calling processors for nothing.Handlers should still check the record levels within handle(), returning false in isHandling() is no guarantee that handle() will not be called, and isHandling() might not be called for a given record.
Parameters
array$recordPartial log record containing only a level key
Returns
bool
} More...
 
 handleBatch (array $records)
 {Handles a set of records at once.
Parameters
array$recordsThe records to handle (an array of record arrays)
} More...
 
 close ()
 Closes the handler. More...
 
 pushProcessor ($callback)
 {Adds a processor in the stack.
Parameters
callable$callback
Returns
self
} More...
 
 popProcessor ()
 {Removes the processor on top of the stack and returns it.
Returns
callable
} More...
 
 setFormatter (FormatterInterface $formatter)
 {Sets the formatter.
Parameters
FormatterInterface$formatter
Returns
self
} More...
 
 getFormatter ()
 {Gets the formatter.
Returns
FormatterInterface
} More...
 
 setLevel ($level)
 Sets minimum logging level at which this handler will be triggered. More...
 
 getLevel ()
 Gets minimum logging level at which this handler will be triggered. More...
 
 setBubble ($bubble)
 Sets the bubbling behavior. More...
 
 getBubble ()
 Gets the bubbling behavior. More...
 
 __destruct ()
 
 reset ()
 

Protected Member Functions

 generateDataStream ($record)
 {} More...
 
- Protected Member Functions inherited from Monolog\Handler\SocketHandler
 write (array $record)
 Connect (if necessary) and write to the socket. More...
 
 pfsockopen ()
 Wrapper to allow mocking. More...
 
 fsockopen ()
 Wrapper to allow mocking. More...
 
 streamSetTimeout ()
 Wrapper to allow mocking. More...
 
 streamSetChunkSize ()
 Wrapper to allow mocking. More...
 
 fwrite ($data)
 Wrapper to allow mocking. More...
 
 streamGetMetadata ()
 Wrapper to allow mocking. More...
 
 generateDataStream ($record)
 
 getResource ()
 
- Protected Member Functions inherited from Monolog\Handler\AbstractProcessingHandler
 write (array $record)
 Writes the record down to the log of the implementing handler. More...
 
 processRecord (array $record)
 Processes a record. More...
 
- Protected Member Functions inherited from Monolog\Handler\AbstractHandler
 getDefaultFormatter ()
 Gets the default formatter. More...
 

Protected Attributes

 $logToken
 
- Protected Attributes inherited from Monolog\Handler\AbstractHandler
 $level = Logger::DEBUG
 
 $bubble = true
 
 $formatter
 
 $processors = array()
 

Detailed Description

Author
Robert Kaufmann III rok3@.nosp@m.rok3.nosp@m..me

Definition at line 19 of file LogEntriesHandler.php.

Constructor & Destructor Documentation

◆ __construct()

Monolog\Handler\LogEntriesHandler::__construct (   $token,
  $useSSL = true,
  $level = Logger::DEBUG,
  $bubble = true,
  $host = 'data.logentries.com' 
)
Parameters
string$tokenLog token supplied by LogEntries
bool$useSSLWhether or not SSL encryption should be used.
int$levelThe minimum logging level to trigger this handler
bool$bubbleWhether or not messages that are handled should bubble up the stack.
Exceptions
MissingExtensionExceptionIf SSL encryption is set to true and OpenSSL is missing

Definition at line 34 of file LogEntriesHandler.php.

References Monolog\Handler\AbstractHandler\$bubble, $endpoint, Monolog\Handler\AbstractHandler\$level, and PHPMailer\PHPMailer\$token.

35  {
36  if ($useSSL && !extension_loaded('openssl')) {
37  throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
38  }
39 
40  $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80';
41  parent::__construct($endpoint, $level, $bubble);
42  $this->logToken = $token;
43  }
$endpoint

Member Function Documentation

◆ generateDataStream()

Monolog\Handler\LogEntriesHandler::generateDataStream (   $record)
protected

{}

Parameters
array$record
Returns
string

Definition at line 51 of file LogEntriesHandler.php.

52  {
53  return $this->logToken . ' ' . $record['formatted'];
54  }

Field Documentation

◆ $logToken

Monolog\Handler\LogEntriesHandler::$logToken
protected

Definition at line 24 of file LogEntriesHandler.php.


The documentation for this class was generated from the following file: