Constants

VAR_LEVEL

VAR_LEVEL

VAR_DESTINATIONS

VAR_DESTINATIONS

VAR_PREFIXE

VAR_PREFIXE

VAR_FILES

VAR_FILES

VAR_IP

VAR_IP

VAR_SHOW_REDIRECT

VAR_SHOW_REDIRECT

DEBUG

DEBUG

INFO

INFO

NOTICE

NOTICE

WARNING

WARNING

ERROR

ERROR

CRITICAL

CRITICAL

ALERT

ALERT

EMERGENCY

EMERGENCY

MUET

MUET

DEFAULT_LEVEL

DEFAULT_LEVEL

DEFAUT_DESTINATIONS

DEFAUT_DESTINATIONS

DEFAUT_PREFIXE

DEFAUT_PREFIXE

DEFAUT_FILES

DEFAUT_FILES

DEFAUT_IP

DEFAUT_IP

DEFAUT_SHOW_REDIRECT

DEFAUT_SHOW_REDIRECT

Properties

$dir_destinations

$dir_destinations

$levels

$levels

$destinations

$destinations : array

Type

array — containing class of destination handler

$mode_back_office

$mode_back_office

$level

$level

$prefixe

$prefixe

$files

$files

$all_files

$all_files

$show_redirect

$show_redirect

$done

$done

$linecount

$linecount

Methods

setDestinations()

setDestinations(string $destinations)

Parameters

string $destinations

setLevel()

setLevel(int $level)

change the debug level. Use Tlog constant : \Thelia\Log\Tlog::DEBUG set level to Debug

Parameters

int $level

setPrefix()

setPrefix( $prefixe)

Parameters

$prefixe

setFiles()

setFiles( $files)

Parameters

$files

setIp()

setIp( $ips)

Parameters

$ips

setShowRedirect()

setShowRedirect( $bool)

Parameters

$bool

setConfig()

setConfig( $destination,  $param,  $valeur)

Parameters

$destination
$param
$valeur

getConfig()

getConfig( $destination,  $param)

Parameters

$destination
$param

debug()

debug(string $message, array $context) : null

Detailed debug information.

Parameters

string $message
array $context

Returns

null

addDebug()

addDebug()

Alias of debug method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addDebug($arg1, $arg2, $arg3);

info()

info(string $message, array $context) : null

Interesting events.

Example: User logs in, SQL logs.

Parameters

string $message
array $context

Returns

null

addInfo()

addInfo()

Alias of info method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addInfo($arg1, $arg2, $arg3);

notice()

notice(string $message, array $context) : null

Normal but significant events.

Parameters

string $message
array $context

Returns

null

addNotice()

addNotice()

Alias of notice method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addNotice($arg1, $arg2, $arg3);

warning()

warning(string $message, array $context) : null

Exceptional occurrences that are not errors.

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Parameters

string $message
array $context

Returns

null

addWarning()

addWarning()

Alias of warning method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addWarning($arg1, $arg2, $arg3);

error()

error(string $message, array $context) : null

Runtime errors that do not require immediate action but should typically be logged and monitored.

Parameters

string $message
array $context

Returns

null

addError()

addError()

Alias of error method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addError($arg1, $arg2, $arg3);

err()

err( $message, array $context)

Parameters

$message
array $context

critical()

critical(string $message, array $context) : null

Critical conditions.

Example: Application component unavailable, unexpected exception.

Parameters

string $message
array $context

Returns

null

addCritical()

addCritical()

Alias of critical method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addCritical($arg1, $arg2, $arg3);

crit()

crit( $message, array $context)

Parameters

$message
array $context

alert()

alert(string $message, array $context) : null

Action must be taken immediately.

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

Parameters

string $message
array $context

Returns

null

addAlert()

addAlert()

Alias of alert method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addAlert($arg1, $arg2, $arg3);

emergency()

emergency(string $message, array $context) : null

System is unusable.

Parameters

string $message
array $context

Returns

null

addEmergency()

addEmergency()

Alias of emergency method. With this method you can put all parameter you want

ex : Tlog::getInstance()->addEmergency($arg1, $arg2, $arg3);

log()

log(mixed $level, string $message, array $context) : null

Logs with an arbitrary level.

Parameters

mixed $level
string $message
array $context

Returns

null

SetBackOfficeMode()

SetBackOfficeMode( $booleen)

Parameters

$booleen

write()

write(string $res) : void

final end method. Write log for each destination handler

Parameters

string $res

writeOnExit()

writeOnExit()

showRedirect()

showRedirect( $url)

Parameters

$url

isActivated()

isActivated(int $level) : boolean

check if level is activated and control if current file is activated

Parameters

int $level

Returns

boolean

isActivedFile()

isActivedFile(string $file) : boolean

check if $file is in authorized files

Parameters

string $file

Returns

boolean

init()

init()

initialize default configuration

interpolate()

interpolate( $message, array $context)

Parameters

$message
array $context

loadDestinations()

loadDestinations(\Thelia\Log\type $destinations, array $actives)

Parameters

\Thelia\Log\type $destinations
array $actives

array containing classes instanceof AbstractTlogDestination

__construct()

__construct()

findOrigin()

findOrigin()

out()

out( $level,  $message, array $context)

Parameters

$level
$message
array $context