Public Member Functions | |
zLogClient () | |
__construct () | |
write ($headerObj) |
For internal use only.
Definition at line 31 of file usr/lib/module/socket/log.php.
zLogClient::__construct | ( | ) |
Reimplemented from zCore.
Definition at line 35 of file usr/lib/module/socket/log.php.
References zSocketClient::connect(), zLogger::error(), zDef::get(), and perror().
Referenced by zLogClient().
00035 { 00036 parent::__construct(zDef::get('Z_LOG_SOCK_HOST'), zDef::get('Z_LOG_SOCK_PORT'), zDef::get('Z_LOG_SOCK_TIMEOUT')); 00037 if(!$this->connect()){ 00038 perror('Failed to Connect with Log server'); 00039 if(class_exists('zLogger'))zLogger::error('Failed to Conect with the Log server', 'log.socket'); 00040 exit; 00041 } 00042 }
zLogClient::zLogClient | ( | ) |
Definition at line 32 of file usr/lib/module/socket/log.php.
References __construct().
00032 { 00033 $this->__construct(); 00034 }
zLogClient::write | ( | $ | headerObj | ) |
Definition at line 43 of file usr/lib/module/socket/log.php.
References zSocketClient::send().
00043 { 00044 $header = "TimeStamp: ".$headerObj['timestamp']."\r\n"; 00045 $header .= "Time: ".$headerObj['time']."\r\n"; 00046 $header .= "Type: ".$headerObj['type']."\r\n"; 00047 $header .= "Title: ".$headerObj['title']."\r\n"; 00048 $header .= "Msg: ".$headerObj['msg']."\r\n.\r\n"; 00049 //echo "\n<font size='2.5' color='green'><code><<<< ".nl2br(htmlspecialchars($header))."\n</code></font><br />"; 00050 $this->send($header); 00051 }