Tlog
class Tlog implements LoggerInterface
Thelia Logger
Allow to define different level and output.
Constants
VAR_LEVEL |
|
VAR_DESTINATIONS |
|
VAR_PREFIXE |
|
VAR_FILES |
|
VAR_IP |
|
VAR_SHOW_REDIRECT |
|
DEBUG |
|
INFO |
|
NOTICE |
|
WARNING |
|
ERROR |
|
CRITICAL |
|
ALERT |
|
EMERGENCY |
|
MUET |
|
DEFAULT_LEVEL |
|
DEFAUT_DESTINATIONS |
|
DEFAUT_PREFIXE |
|
DEFAUT_FILES |
|
DEFAUT_IP |
|
DEFAUT_SHOW_REDIRECT |
|
Properties
$dir_destinations |
Methods
No description
Create a new Tlog instance, that could be configured without interfering with the "main" instance
No description
Return the directories where destinations classes should be searched.
change the debug level. Use Tlog constant : \Thelia\Log\Tlog::DEBUG set level to Debug
No description
No description
No description
No description
No description
No description
Detailed debug information.
Alias of debug method. With this method you can put all parameter you want
Interesting events.
Alias of info method. With this method you can put all parameter you want
Normal but significant events.
Alias of notice method. With this method you can put all parameter you want
Exceptional occurrences that are not errors.
Alias of warning method. With this method you can put all parameter you want
Runtime errors that do not require immediate action but should typically be logged and monitored.
Alias of error method. With this method you can put all parameter you want
No description
Critical conditions.
Alias of critical method. With this method you can put all parameter you want
No description
Action must be taken immediately.
Alias of alert method. With this method you can put all parameter you want
System is unusable.
Alias of emergency method. With this method you can put all parameter you want
Logs with an arbitrary level.
final end method. Write log for each destination handler
No description
No description
check if level is activated and control if current file is activated
check if $file is in authorized files
Details
at line 104
static
Tlog
getInstance()
at line 123
static
Tlog
getNewInstance()
Create a new Tlog instance, that could be configured without interfering with the "main" instance
at line 161
setDestinations(
string $destinations)
at line 179
array
getDestinationsDirectories()
Return the directories where destinations classes should be searched.
at line 190
setLevel(
int $level)
change the debug level. Use Tlog constant : \Thelia\Log\Tlog::DEBUG set level to Debug
at line 197
setPrefix($prefix)
at line 204
setFiles($files)
at line 213
setIp($ips)
at line 222
setShowRedirect($bool)
at line 230
setConfig($destination, $param, $valeur)
at line 240
getConfig($destination, $param)
at line 259
null
debug(
string $message,
array $context = array())
Detailed debug information.
at line 271
addDebug()
Alias of debug method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addDebug($arg1, $arg2, $arg3);
at line 289
null
info(
string $message,
array $context = array())
Interesting events.
Example: User logs in, SQL logs.
at line 301
addInfo()
Alias of info method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addInfo($arg1, $arg2, $arg3);
at line 317
null
notice(
string $message,
array $context = array())
Normal but significant events.
at line 329
addNotice()
Alias of notice method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addNotice($arg1, $arg2, $arg3);
at line 348
null
warning(
string $message,
array $context = array())
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
at line 360
addWarning()
Alias of warning method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addWarning($arg1, $arg2, $arg3);
at line 377
null
error(
string $message,
array $context = array())
Runtime errors that do not require immediate action but should typically be logged and monitored.
at line 389
addError()
Alias of error method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addError($arg1, $arg2, $arg3);
at line 402
err($message,
array $context = array())
at line 416
null
critical(
string $message,
array $context = array())
Critical conditions.
Example: Application component unavailable, unexpected exception.
at line 428
addCritical()
Alias of critical method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addCritical($arg1, $arg2, $arg3);
at line 441
crit($message,
array $context = array())
at line 456
null
alert(
string $message,
array $context = array())
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
at line 468
addAlert()
Alias of alert method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addAlert($arg1, $arg2, $arg3);
at line 484
null
emergency(
string $message,
array $context = array())
System is unusable.
at line 496
addEmergency()
Alias of emergency method. With this method you can put all parameter you want
ex : Tlog::getInstance()->addEmergency($arg1, $arg2, $arg3);
at line 513
null
log(
mixed $level,
string $message,
array $context = array())
Logs with an arbitrary level.
at line 529
void
write(
string $res)
final end method. Write log for each destination handler
at line 546
writeOnExit()
at line 558
showRedirect($url)
at line 583
boolean
isActivated(
int $level)
check if level is activated and control if current file is activated
at line 605
boolean
isActivedFile(
string $file)
check if $file is in authorized files