class Logger extends AbstractLogger implements LoggerInterface
Write some log infos in log files
For compliance, this class implements the PSR Logger Interface.
Constants
EMERGENCY |
|
ALERT |
|
CRITICAL |
|
ERROR |
|
WARNING |
|
NOTICE |
|
INFO |
|
DEBUG |
|
Methods
__construct(array $user_options = array())
Creation of a new logger entry |
||
bool |
log(int $level, string $message, array $context = array(), string $logname = null)
Logs with an arbitrary level. |
|
__set(string $var, mixed $val)
Allows to set a property or a configuration entry like : $logger->config_name = $val |
||
mixed |
__get(string $var)
Allows to call a configuration entry like : $logger->config_name |
|
static array |
getOptions()
|
|
static string |
interpolate(string $message, array $context = array(), bool $silent = false)
Interpolates context values into the message placeholders. |
|
static |
getUserIp()
Get the user IP address |
|
static string |
writeArray(array $array)
Write an array on one line |
|
static string |
writeArrayItem(array $item)
Safely transform an array item in string |
Details
at line 116
public
__construct(array $user_options = array())
Creation of a new logger entry
at line 131
public bool
log(int $level, string $message, array $context = array(), string $logname = null)
Logs with an arbitrary level.
at line 174
public
__set(string $var, mixed $val)
Allows to set a property or a configuration entry like : $logger->config_name = $val
at line 192
public mixed
__get(string $var)
Allows to call a configuration entry like : $logger->config_name
at line 204
static public array
getOptions()
at line 219
static public string
interpolate(string $message, array $context = array(), bool $silent = false)
Interpolates context values into the message placeholders.
at line 419
static public
getUserIp()
Get the user IP address
at line 436
static public string
writeArray(array $array)
Write an array on one line
at line 455
static public string
writeArrayItem(array $item)
Safely transform an array item in string