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])
Afficher le fichier Open project: simplesamlphp/simplesamlphp Class Usage Examples

Méthodes publiques

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

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

Log an alert.
public static alert ( $string )

critical() public static méthode

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

debug() public static méthode

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

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

error() public static méthode

Log an error.
public static error ( $string )

flush() public static méthode

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

Get the captured log.
public static getCapturedLog ( )

info() public static méthode

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

isErrorMasked() public static méthode

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.
Résultat boolean True if the error is masked, false otherwise.

maskErrors() public static méthode

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

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

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

setCaptureLog() public static méthode

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

setTrackId() public static méthode

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

Statistics.
public static stats ( $string )

warning() public static méthode

Log a warning.
public static warning ( $string )