Skip to content

Commit be7720d

Browse files
committed
Complete docbooks comments
1 parent 953d369 commit be7720d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

syslog.class.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,17 @@ class Net_Syslog
291291
*/
292292
private $_appname;
293293

294+
/**
295+
* Constructor of class
296+
*
297+
* @param string $hostname Optional. Sender hostname.
298+
* @param string $appname Optional. AppName as defined in RFC 5424.
299+
* @param string $protocol Optional. Can be NET_SYSLOG_UDP, NET_SYSLOG_TCP, NET_SYSLOG_SSL or NET_SYSLOG_TLS.
300+
* @param string $procid Optional. ProcID as defined in RFC 5424.
301+
*
302+
* @access public
303+
* @see Net_Syslog
304+
*/
294305
public function Net_Syslog($hostname = "", $appname = NET_SYSLOG_NILVALUE,
295306
$protocol = NET_SYSLOG_UDP, $procid = NET_SYSLOG_NILVALUE
296307
) {
@@ -334,6 +345,13 @@ public function Net_Syslog($hostname = "", $appname = NET_SYSLOG_NILVALUE,
334345
$this->_port = 514;
335346
}
336347

348+
/**
349+
* Function to get local server address when not available
350+
*
351+
* @return string Local server address
352+
*
353+
* @access private
354+
*/
337355
private function getServerAddress()
338356
{
339357
if(array_key_exists('SERVER_ADDR', $_SERVER))
@@ -501,6 +519,15 @@ private function closeSocket ()
501519
$this->_socket = NULL;
502520
}
503521

522+
/**
523+
* Function to send a log message RFC3164 compliant
524+
*
525+
* @param int $priority Optional. Priority of message. Is a sum of Severity and Criticity.
526+
* @param string $content Optional. Message content.
527+
*
528+
* @access public
529+
* @see Net_Syslog
530+
*/
504531
public function logger3164($priority = 133, $content = "Default content")
505532
{
506533
$rfc = $this->_rfc;
@@ -509,6 +536,17 @@ public function logger3164($priority = 133, $content = "Default content")
509536
$this->_rfc = $rfc;
510537
}
511538

539+
/**
540+
* Function to send a log message RFC542X compliant
541+
*
542+
* @param int $priority Optional. Priority of message. Is a sum of Severity and Criticity.
543+
* @param string $content Optional. Message content.
544+
* @param string $msgid Optional. MsgID of the message, according to RFC5424.
545+
* @param string $structured_data Optional. Structured data of the message, according to RFC5424.
546+
*
547+
* @access public
548+
* @see Net_Syslog
549+
*/
512550
public function logger542X($priority = 133, $content = "Default content",
513551
$msgid = "-", $structured_data = "-"
514552
) {
@@ -518,6 +556,17 @@ public function logger542X($priority = 133, $content = "Default content",
518556
$this->_rfc = $rfc;
519557
}
520558

559+
/**
560+
* Function to send a log message. RFC3164 or 542X chosen according to $_rfc parameter.
561+
*
562+
* @param int $priority Optional. Priority of message. Is a sum of Severity and Criticity.
563+
* @param string $content Optional. Message content.
564+
* @param string $msgid Optional. MsgID of the message, according to RFC5424. Ignored in RFC3164 mode.
565+
* @param string $structured_data Optional. Structured data of the message, according to RFC5424. Ignored in RFC3164 mode.
566+
*
567+
* @access public
568+
* @see Net_Syslog
569+
*/
521570
public function logger($priority = 133, $content = "Default content",
522571
$msgid = "-", $structured_data = "-"
523572
) {

0 commit comments

Comments
 (0)