71 $this->_id = md5(microtime());
73 $this->_ident = $ident;
76 if (!empty($conf[
'destination'])) {
77 $this->_destination = $conf[
'destination'];
80 if (!empty($conf[
'extra_headers'])) {
81 $this->_extra_headers = $conf[
'extra_headers'];
84 if (!empty($conf[
'lineFormat'])) {
85 $this->_lineFormat = str_replace(array_keys($this->_formatMap),
86 array_values($this->_formatMap),
90 if (!empty($conf[
'timeFormat'])) {
91 $this->_timeFormat = $conf[
'timeFormat'];
103 $this->_opened =
true;
115 $this->_opened =
false;
131 function log($message, $priority = null)
134 if ($priority === null) {
147 $line = $this->
_format($this->_lineFormat,
148 strftime($this->_timeFormat),
149 $priority, $message);
152 $success = error_log($line, $this->_type, $this->_destination,
153 $this->_extra_headers);
155 $this->
_announce(array(
'priority' => $priority,
'message' => $message));