Property | Type | Description | |
---|---|---|---|
$defaultTag | string | Default tag to send | |
$enabled | boolean | Indicates whether logging is enabled | |
$subscribers | array | Event subscribers | |
$writer | A backend writer |
Method | Description | |
---|---|---|
__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 |
Method | Description | |
---|---|---|
getCommonData ( ) : array | Prepares extra data to pass to a backend | |
initializeSubscribers ( ) | Initializes Event subscribers | |
setWriter ( array $config ) : |
Set writer to AbstractLogger |
Method | Description | |
---|---|---|
validateConfig ( array $config ) | Validates configuration options |
public __construct ( array $config ) | ||
$config | array | Logger configuration |
protected getCommonData ( ) : array | ||
return | array | Prepared extra data for logging |
public static getTimestamp ( integer $time = null ) : string | ||
$time | integer | Unix timestamp |
return | string | Returns current timestamp in the server time zone. |
protected initializeSubscribers ( ) |
public setIsEnabled ( boolean $isEnabled = null ) : |
||
$isEnabled | boolean | Whether logger is enabled |
return |
protected bool $enabled | ||
return | boolean |