PHP Class RedBeanPHP\Logger\RDefault

Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: implements RedBeanPHP\Logger
Datei anzeigen Open project: gabordemooij/redbean Class Usage Examples

Protected Properties

Property Type Description
$logs array
$mode integer

Public Methods

Method Description
clear ( ) : self Clears the internal log array, removing all previously stored entries.
getLogs ( ) : array Returns the internal log array.
grep ( string $needle ) : array Searches for all log entries in internal log array for $needle and returns those entries.
log ( ) : void Default logger method logging to STDOUT.
setMode ( integer $mode ) : self Selects a logging mode.

Method Details

clear() public method

Clears the internal log array, removing all previously stored entries.
public clear ( ) : self
return self

getLogs() public method

The internal log array is where all log messages are stored.
public getLogs ( ) : array
return array

grep() public method

This method will return an array containing all matches for your search query.
public grep ( string $needle ) : array
$needle string phrase to look for in internal log array
return array

log() public method

This is the default/reference implementation of a logger. This method will write the message value to STDOUT (screen) unless you have changed the mode of operation to C_LOGGER_ARRAY.
public log ( ) : void
return void

setMode() public method

There are several options available. * C_LOGGER_ARRAY - log silently, stores entries in internal log array only * C_LOGGER_ECHO - also forward log messages directly to STDOUT
public setMode ( integer $mode ) : self
$mode integer mode of operation for logging object
return self

Property Details

$logs protected_oe property

protected array $logs
return array

$mode protected_oe property

protected int $mode
return integer