PHP Class SimpleSAML\Logger

Author: Lasse Birnbaum Jensen, SDU.
Author: Andreas Åkre Solberg, UNINETT AS. ([email protected])
Author: Jaime Pérez Crespo, UNINETT AS ([email protected])
Datei anzeigen Open project: simplesamlphp/simplesamlphp Class Usage Examples

Public Methods

Method Description
alert ( $string ) Log an alert.
critical ( $string ) Log a critical message.
debug ( $string ) Debug messages are very verbose, and will contain more information than what is necessary for a production system.
emergency ( $string ) Log an emergency message.
error ( $string ) Log an error.
flush ( ) Flush any pending log messages to the logging handler.
getCapturedLog ( ) Get the captured log.
info ( $string ) Info messages are a bit less verbose than debug messages. This is useful to trace a session.
isErrorMasked ( integer $errno ) : boolean Evaluate whether errors of a certain error level are masked or not.
maskErrors ( integer $mask ) Disable error reporting for the given log levels.
notice ( $string ) We reserve the notice level for statistics, so do not use this level for other kind of log messages.
popErrorMask ( ) Pop an error mask.
setCaptureLog ( $val = true ) Set the logger to capture logs.
setTrackId ( $trackId ) Set the track identifier to use in all logs.
stats ( $string ) Statistics.
warning ( $string ) Log a warning.

Private Methods

Method Description
createLoggingHandler ( $handler = null )
defer ( integer $level, string $message, boolean $stats ) Defer a message for later logging.
log ( $level, $string, $statsLog = false )

Method Details

alert() public static method

Log an alert.
public static alert ( $string )

critical() public static method

Log a critical message.
public static critical ( $string )

debug() public static method

Debug messages are very verbose, and will contain more information than what is necessary for a production system.
public static debug ( $string )

emergency() public static method

Log an emergency message.
public static emergency ( $string )

error() public static method

Log an error.
public static error ( $string )

flush() public static method

This method is intended to be registered as a shutdown handler, so that any pending messages that weren't sent to the logging handler at that point, can still make it. It is therefore not intended to be called manually.
public static flush ( )

getCapturedLog() public static method

Get the captured log.
public static getCapturedLog ( )

info() public static method

Info messages are a bit less verbose than debug messages. This is useful to trace a session.
public static info ( $string )

isErrorMasked() public static method

Evaluate whether errors of a certain error level are masked or not.
public static isErrorMasked ( integer $errno ) : boolean
$errno integer The level of the error to check.
return boolean True if the error is masked, false otherwise.

maskErrors() public static method

Every call to this function must be followed by a call to popErrorMask().
public static maskErrors ( integer $mask )
$mask integer The log levels that should be masked.

notice() public static method

We reserve the notice level for statistics, so do not use this level for other kind of log messages.
public static notice ( $string )

popErrorMask() public static method

This function restores the previous error mask.
public static popErrorMask ( )

setCaptureLog() public static method

Set the logger to capture logs.
public static setCaptureLog ( $val = true )

setTrackId() public static method

Set the track identifier to use in all logs.
public static setTrackId ( $trackId )
$trackId string The track identifier to use during this session.

stats() public static method

Statistics.
public static stats ( $string )

warning() public static method

Log a warning.
public static warning ( $string )