49 function Log_display($name =
'', $ident =
'', $conf = array(),
52 $this->_id = md5(microtime());
53 $this->_ident = $ident;
57 if (!empty($conf[
'lineFormat'])) {
58 $this->_lineFormat = str_replace(array_keys($this->_formatMap),
59 array_values($this->_formatMap),
65 if (isset($conf[
'error_prepend'])) {
66 $prepend = $conf[
'error_prepend'];
68 $prepend = ini_get(
'error_prepend_string');
70 if (!empty($prepend)) {
76 if (isset($conf[
'error_append'])) {
77 $append = $conf[
'error_append'];
79 $append = ini_get(
'error_append_string');
81 if (!empty($append)) {
82 $this->_lineFormat .= $append;
86 if (isset($conf[
'linebreak'])) {
87 $this->_lineFormat .= $conf[
'linebreak'];
89 $this->_lineFormat .=
"<br />\n";
93 if (!empty($conf[
'timeFormat'])) {
94 $this->_timeFormat = $conf[
'timeFormat'];
106 $this->_opened =
true;
118 $this->_opened =
false;
134 function log($message, $priority = null)
137 if ($priority === null) {
150 echo $this->
_format($this->_lineFormat,
151 strftime($this->_timeFormat),
153 nl2br(htmlspecialchars($message)));
156 $this->
_announce(array(
'priority' => $priority,
'message' => $message));