Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: leirn/php.syslog.class
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1
Choose a base ref
...
head repository: leirn/php.syslog.class
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 6 commits
  • 1 file changed
  • 3 contributors

Commits on Jun 20, 2018

  1. Update syslog.class.php

    Typo fix
    cactux authored Jun 20, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cc1c287 View commit details
  2. Merge pull request #2 from cactux/patch-1

    Update syslog.class.php
    leirn authored Jun 20, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    19c6a53 View commit details

Commits on Feb 20, 2023

  1. syslog.class.php

    618
    -        if($this->_rfc == NET_SYSLOG_RFC542X && $this->protocol == NET_SYSLOG_TLS) {
    +       if($this->_rfc == NET_SYSLOG_RFC542X && $this->_protocol == NET_SYSLOG_TLS) {
    alexnas committed Feb 20, 2023
    Copy the full SHA
    0e48e28 View commit details
  2. https://github.com/leirn/php.syslog.class/blob/master/syslog.class.php

    305
    -  public function Net_Syslog($hostname = "", $appname = NET_SYSLOG_NILVALUE,
    + public function __construct($hostname = "", $appname = NET_SYSLOG_NILVALUE,
    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Net_Syslog has a deprecated constructor in php.syslog.class-master/syslog.class.php on line 218
    alexnas committed Feb 20, 2023
    Copy the full SHA
    6aea609 View commit details

Commits on Mar 9, 2023

  1. Merge pull request #5 from alexnas77/master

    Some improvements
    leirn authored Mar 9, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d4ed66a View commit details

Commits on Mar 10, 2023

  1. Indentation issue

    leirn authored Mar 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    38d08f2 View commit details
Showing with 7 additions and 7 deletions.
  1. +7 −7 syslog.class.php
14 changes: 7 additions & 7 deletions syslog.class.php
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
/**
* The Syslog class is a syslog client implementation in PHP
* following the RFC 3164, 5424, 5425, 5426 rules.
* This class is compatible with PHP logger constants for serverity and facility.
* This class is compatible with PHP logger constants for severity and facility.
* Default value are UDP connection with RFC3164 mode
*
* Facility values:
@@ -302,7 +302,7 @@ class Net_Syslog
* @access public
* @see Net_Syslog
*/
public function Net_Syslog($hostname = "", $appname = NET_SYSLOG_NILVALUE,
public function __construct($hostname = "", $appname = NET_SYSLOG_NILVALUE,
$protocol = NET_SYSLOG_UDP, $procid = NET_SYSLOG_NILVALUE
) {
$this->_rfc = NET_SYSLOG_RFC3164;
@@ -610,13 +610,13 @@ public function logger($priority = 133, $content = "Default content",
if(strlen($this->_appname) > 0)
$tag = substr($this->_appname, 0 , 32).": ";
$message = substr($header.$tag.$content, 0, 1024);
}
}

$this->openSocket();
$this->openSocket();

// RFC 5425
if($this->_rfc == NET_SYSLOG_RFC542X && $this->protocol == NET_SYSLOG_TLS) {
$message = strlen($message)." ".$message;
// RFC 5425
if($this->_rfc == NET_SYSLOG_RFC542X && $this->_protocol == NET_SYSLOG_TLS) {
$message = strlen($message)." ".$message;
}

fwrite($this->_socket, $message);