PHP Class Gpf_Log_Logger

Inheritance: extends Gpf_Object
Exibir arquivo Open project: fubralimited/php-oara Class Usage Examples

Public Methods

Method Description
add ( $type, $logLevel ) : Gpf_Log_LoggerBase attachs new log system
addLogger ( Gpf_Log_LoggerBase $logger, integer $logLevel ) : Gpf_Log_LoggerBase
checkLoggerTypeExists ( unknown_type $type ) : unknown Checks if logger with te specified type was already initialized
critical ( string $message, string $logGroup = null ) logs critical error message
debug ( string $message, string $logGroup = null ) logs debug message
disableType ( $type )
enableAllTypes ( )
enableType ( $type )
error ( string $message, string $logGroup = null ) logs error message
getCustomParameter ( string $name ) : string returns custom parameter
getGroup ( )
getInstance ( string $instanceName = '_' ) : Gpf_Log_Logger returns instance of logger class.
info ( string $message, string $logGroup = null ) logs info message
isLogToDisplay ( ) : boolean returns true if debugging writes log to display
isLoggerInsert ( $sqlString )
log ( string $message, string $logLevel, string $logGroup = null ) logs message
removeAll ( )
setCustomParameter ( string $name, string $value ) function sets custom parameter for the logger
setGroup ( $group = null )
setType ( $type )
warning ( string $message, string $logGroup = null ) logs warning message

Private Methods

Method Description
create ( $type ) : Gpf_Log_LoggerBase
findCallingFile ( $calls, $functionName )
findFileByCallingMethod ( $calls )
findFileBySqlBenchmark ( )
findLatestObjectBeforeString ( $text )
findLogFile ( )
getObjectVariables ( $object )
sqlBenchmarkFound ( $calls )

Method Details

add() public method

attachs new log system
public add ( $type, $logLevel ) : Gpf_Log_LoggerBase
return Gpf_Log_LoggerBase

addLogger() public method

public addLogger ( Gpf_Log_LoggerBase $logger, integer $logLevel ) : Gpf_Log_LoggerBase
$logger Gpf_Log_LoggerBase
$logLevel integer
return Gpf_Log_LoggerBase

checkLoggerTypeExists() public method

Checks if logger with te specified type was already initialized
public checkLoggerTypeExists ( unknown_type $type ) : unknown
$type unknown_type
return unknown

critical() public method

logs critical error message
public critical ( string $message, string $logGroup = null )
$message string
$logGroup string

debug() public method

logs debug message
public debug ( string $message, string $logGroup = null )
$message string
$logGroup string

disableType() public method

public disableType ( $type )

enableAllTypes() public method

public enableAllTypes ( )

enableType() public method

public enableType ( $type )

error() public method

logs error message
public error ( string $message, string $logGroup = null )
$message string
$logGroup string

getCustomParameter() public method

returns custom parameter
public getCustomParameter ( string $name ) : string
$name string
return string

getGroup() public method

public getGroup ( )

getInstance() public static method

You can add instance name, if you want to have multiple independent instances of logger
public static getInstance ( string $instanceName = '_' ) : Gpf_Log_Logger
$instanceName string
return Gpf_Log_Logger

info() public method

logs info message
public info ( string $message, string $logGroup = null )
$message string
$logGroup string

isLogToDisplay() public method

returns true if debugging writes log to display
public isLogToDisplay ( ) : boolean
return boolean

isLoggerInsert() public static method

public static isLoggerInsert ( $sqlString )

log() public method

logs message
public log ( string $message, string $logLevel, string $logGroup = null )
$message string
$logLevel string
$logGroup string

removeAll() public method

public removeAll ( )

setCustomParameter() public method

function sets custom parameter for the logger
public setCustomParameter ( string $name, string $value )
$name string
$value string

setGroup() public method

public setGroup ( $group = null )

setType() public method

public setType ( $type )

warning() public method

logs warning message
public warning ( string $message, string $logGroup = null )
$message string
$logGroup string