PHP Class RedBeanPHP\Logger\RDefault

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

Protected Properties

Свойство Type Description
$logs array
$mode integer

Méthodes publiques

Méthode 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 méthode

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

getLogs() public méthode

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

grep() public méthode

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
Résultat array

log() public méthode

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
Résultat void

setMode() public méthode

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
Résultat self

Property Details

$logs protected_oe property

protected array $logs
Résultat array

$mode protected_oe property

protected int $mode
Résultat integer