Свойство | Тип | Описание | |
---|---|---|---|
$defaultTag | string | Default tag to send | |
$enabled | boolean | Indicates whether logging is enabled | |
$subscribers | array | Event subscribers | |
$writer | A backend writer |
Метод | Описание | |
---|---|---|
__construct ( array $config ) | Constructor. Instantiates AbstractLogger, prepares backend | |
getTimestamp ( integer $time = null ) : string | Gets current timestamp in common format. | |
isEnabled ( ) : boolean | Returns whether logger is enabled | |
log ( string $event, variadic |
Logs event to a specified backend | |
setIsEnabled ( boolean $isEnabled = null ) : |
Set is enabled logger |
Метод | Описание | |
---|---|---|
getCommonData ( ) : array | Prepares extra data to pass to a backend | |
initializeSubscribers ( ) | Initializes Event subscribers | |
setWriter ( array $config ) : |
Set writer to AbstractLogger |
Метод | Описание | |
---|---|---|
validateConfig ( array $config ) | Validates configuration options |
public __construct ( array $config ) | ||
$config | array | Logger configuration |
protected getCommonData ( ) : array | ||
Результат | array | Prepared extra data for logging |
public static getTimestamp ( integer $time = null ) : string | ||
$time | integer | Unix timestamp |
Результат | string | Returns current timestamp in the server time zone. |
protected initializeSubscribers ( ) |
public setIsEnabled ( boolean $isEnabled = null ) : |
||
$isEnabled | boolean | Whether logger is enabled |
Результат |
protected bool $enabled | ||
Результат | boolean |