mako\log\Syslog


Description


Syslog adapter.


Class methods


Toggle source

public __construct($config)


Constructor.


Parameters

Type Description
array Configuration
Return value

NULL

public function __construct(array $config)
{
	openlog($config['identifier'], LOG_CONS, $config['facility']);
}

Toggle source

public __destruct()


Destructor

Return value

NULL

public function __destruct()
{
	closelog();
}

Toggle source

public write($message, $type = 4)


Writes message to log.


Parameters

Type Description
string The message to write to the log
int (optional) Message type
Return value

boolean TRUE on success or FALSE on failure.

public function write($message, $type = Log::ERROR)
{
	return syslog($this->types[$type], $message);
}