Logger used to capture any messages via any stream.

category phpDocumentor
package Core
author Mike van Riel
license MIT
link http://phpdoc.org

 Methods

Initialize the logger.

__construct(string $file) 

Parameters

$file

string

May also be the FILE_STDOUT constant to output to STDOUT.

Returns the name of the file/stream where the output is written to or null if it is send to the void.

getFilename() : null | string

Returns

nullstring

Returns the threshold for this logger.

getThreshold() : int

Returns

int

Log the given data; if it is something else than a string it will be var_dumped and then logged.

log(mixed $data, int | string $level) : void

Parameters

$data

mixed

The data to log.

$level

intstring

The level of the message to log.

Sets the logging threshold; anything more detailed than the given level will not be logged.

setThreshold(int $threshold) : void

Parameters

$threshold

int

The min level that will be logged.

 Properties

 

The name of the file/stream where the logs are written to.

$filename : string

 

The logger to use for storing information.

$logger : \Zend_Log

 

Only log messages that equal or exceed this.

$threshold : int

 Constants

 

Alert: action must be taken immediately

ALERT : string

 

Critical: critical conditions

CRIT : string

 

Debug: debug messages

DEBUG : string

 

Emergency: system is unstable

EMERG : string

 

Error: error conditions

ERR : string

 

Output will only be sent to stdout

FILE_STDOUT : string

 

Informational: informational messages

INFO : string

 

Notice: normal but significant condition

NOTICE : string

 

Quiet: disables logging

QUIET : string

 

Warning: warning conditions

WARN : string