53 if (empty($name) || !is_int($name)) {
57 if (isset($conf[
'inherit'])) {
58 $this->_inherit = $conf[
'inherit'];
62 $this->_id = md5(microtime());
64 $this->_ident = $ident;
75 if (!$this->_opened) {
76 $this->_opened = openlog($this->_ident, LOG_PID, $this->_name);
88 if ($this->_opened && !$this->_inherit) {
90 $this->_opened =
false;
109 function log($message, $priority = null)
112 if ($priority === null) {
122 if (!$this->_opened && !$this->
open()) {
131 if ($this->_inherit) {
135 if (!syslog($priority, $message)) {
139 $this->
_announce(array(
'priority' => $priority,
'message' => $message));
160 static $priorities = array(
172 if (!is_int($priority) || !in_array($priority, $priorities)) {
176 return $priorities[$priority];