Constants

EMERG

EMERG

ALERT

ALERT

CRIT

CRIT

ERR

ERR

WARN

WARN

NOTICE

NOTICE

INFO

INFO

DEBUG

DEBUG

TRACE

TRACE

MAX_ARRAY_COUNT

MAX_ARRAY_COUNT

Properties

$_LOG_SEVERITY

$_LOG_SEVERITY : \<type>

The different log severities

Type

\

$_LOG_SEVERITY_ALIAS

$_LOG_SEVERITY_ALIAS : 

Type

$_messageCounter

$_messageCounter : 

Type

$_canWrite

$_canWrite : 

Type

$_timeLastTS

$_timeLastTS : 

Type

$_timeLogs

$_timeLogs : 

Type

$_loadedScriptsTime

$_loadedScriptsTime : 

Type

$_loadedScriptsCount

$_loadedScriptsCount : 

Type

Methods

init()

init() 

Inits Loader. If not called at beginning of request, logger wont work in case of fatal-error. Required classes for logging have to be loaded because loader is blocked after fatal-error.

getSeverity()

getSeverity() : integer

Gets logger severity from config

Returns

integer

write()

write(string  $targetDirectory, integer  $severity, string  $message, object|null  $object = null, boolean  $writeObjectTrace = true, boolean  $writeStackTrace = true) : void

Write log file

Parameters

string $targetDirectory
integer $severity
string $message
object|null $object
boolean $writeObjectTrace
boolean $writeStackTrace

time()

time(string  $message, boolean  $writeStat = false) : void

Log a time message

Parameters

string $message
boolean $writeStat

trace()

trace(string  $message, null|object|string  $object = null) : void

Log a debug message

Parameters

string $message
null|object|string $object

debug()

debug(string  $message, null|object  $object = null) : void

Log a debug message

Parameters

string $message
null|object $object

debugToTarget()

debugToTarget(string  $targetDirectory, string  $message, null|object  $object = null) : void

Log a debug message

Parameters

string $targetDirectory
string $message
null|object $object

info()

info(string  $message, null|object  $object = null) : void

Log a info message (info message)

Parameters

string $message
null|object $object

infoToTarget()

infoToTarget(string  $targetDirectory, string  $message, null|object  $object = null) : void

Log a debug message (detailed info)

Parameters

string $targetDirectory
string $message
null|object $object

warn()

warn(string  $message, null|object  $object = null) : void

Log a warn message (recoverable error)

Parameters

string $message
null|object $object

warnToTarget()

warnToTarget(string  $targetDirectory, string  $message, null|object  $object = null) : void

Log a debug message (detailed info)

Parameters

string $targetDirectory
string $message
null|object $object

error()

error(string  $message, null|object|array  $object = null) : void

Log an error message (error, not recoverable), logs a stack trace

Parameters

string $message
null|object|array $object

errorToTarget()

errorToTarget(string  $targetDirectory, string  $message, null|object  $object = null) : void

Log a debug message (detailed info)

Parameters

string $targetDirectory
string $message
null|object $object

dump()

dump(object  $var, integer  $maxDepth = 10) : string

inspired by: http://code.google.com/p/prado3/source/browse/tags/3.1.9/framework/Util/TVarDumper.php

Parameters

object $var
integer $maxDepth

Returns

string

writeFile()

writeFile(string  $targetDirectory, string  $message) : void

Writes message into the specific file

Parameters

string $targetDirectory
string $message

_dump()

_dump(object  $var, integer  $maxDepth, array  $processedObjects = array(), integer  $level) : string

Internally dump object

Parameters

object $var
integer $maxDepth
array $processedObjects
integer $level

Returns

string