PHP Class Pop\Log\Logger

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$priorities array Message priority short codes
$timestamp string Log timestamp format
$writers array Log writers

Méthodes publiques

Méthode Description
__construct ( Pop\Log\Writer\WriterInterface $writer = null ) : Logger Constructor
addWriter ( Pop\Log\Writer\WriterInterface $writer ) : Logger Method to add a log writer
alert ( mixed $message, array $options = [] ) : Logger Method to add an ALERT log entry
crit ( mixed $message, array $options = [] ) : Logger Method to add a CRIT log entry
debug ( mixed $message, array $options = [] ) : Logger Method to add a DEBUG log entry
emerg ( mixed $message, array $options = [] ) : Logger Method to add an EMERG log entry
err ( mixed $message, array $options = [] ) : Logger Method to add an ERR log entry
getTimestamp ( ) : string Method to get timestamp format
getWriters ( ) : array Method to get all log writers
info ( mixed $message, array $options = [] ) : Logger Method to add an INFO log entry
log ( integer $priority, mixed $message, array $options = [] ) : Logger Method to add a log entry
notice ( mixed $message, array $options = [] ) : Logger Method to add a NOTICE log entry
setTimestamp ( string $format = 'Y-m-d H:i:s' ) : Logger Method to set timestamp format
warn ( mixed $message, array $options = [] ) : Logger Method to add a WARN log entry

Method Details

__construct() public méthode

Instantiate the logger object.
public __construct ( Pop\Log\Writer\WriterInterface $writer = null ) : Logger
$writer Pop\Log\Writer\WriterInterface
Résultat Logger

addWriter() public méthode

Method to add a log writer
public addWriter ( Pop\Log\Writer\WriterInterface $writer ) : Logger
$writer Pop\Log\Writer\WriterInterface
Résultat Logger

alert() public méthode

Method to add an ALERT log entry
public alert ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

crit() public méthode

Method to add a CRIT log entry
public crit ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

debug() public méthode

Method to add a DEBUG log entry
public debug ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

emerg() public méthode

Method to add an EMERG log entry
public emerg ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

err() public méthode

Method to add an ERR log entry
public err ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

getTimestamp() public méthode

Method to get timestamp format
public getTimestamp ( ) : string
Résultat string

getWriters() public méthode

Method to get all log writers
public getWriters ( ) : array
Résultat array

info() public méthode

Method to add an INFO log entry
public info ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

log() public méthode

Method to add a log entry
public log ( integer $priority, mixed $message, array $options = [] ) : Logger
$priority integer
$message mixed
$options array
Résultat Logger

notice() public méthode

Method to add a NOTICE log entry
public notice ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

setTimestamp() public méthode

Method to set timestamp format
public setTimestamp ( string $format = 'Y-m-d H:i:s' ) : Logger
$format string
Résultat Logger

warn() public méthode

Method to add a WARN log entry
public warn ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
Résultat Logger

Property Details

$priorities protected_oe property

Message priority short codes
protected array $priorities
Résultat array

$timestamp protected_oe property

Log timestamp format
protected string $timestamp
Résultat string

$writers protected_oe property

Log writers
protected array $writers
Résultat array