src/sb/Logger/Syslog.php
public function save($log_dir = '')
    {
        if (empty($log_dir)) {
            $log_dir = \ROOT . '/private/logs/syslog/';
        }

        if (!is_dir($log_dir)) {
            mkdir($log_dir, 0777, true);
        }

        return file_put_contents($log_dir . date('Y_m_d') . '.log',
                $this->message . "\n", \FILE_APPEND);
    }
public function save($log_dir = '')
    {
        if (empty($log_dir)) {
            $log_dir = \ROOT . '/private/logs/syslog/';
        }

        if (!is_dir($log_dir)) {
            mkdir($log_dir, 0777, true);
        }

        return file_put_contents($log_dir . date('Y_m_d') . '.log',
                $this->message . "\n", \FILE_APPEND);
    }
public function save ( $ log_dir = '' ) { if ( empty ( $ log_dir ) ) { $ log_dir = \ ROOT . '/private/logs/syslog/' ; } if ( ! is_dir ( $ log_dir ) ) { mkdir ( $ log_dir , 0777 , true ) ; } return file_put_contents ( $ log_dir . date ( 'Y_m_d' ) . '.log' , $ this -> message . "\n" , \ FILE_APPEND ) ; }
Saves data to local logs dir when syslog server is not available
@param string $log_dir The log dir the data is written to
@param string $log_type The log_type being written to
@return boolean If the data was written or not
Saves data to local logs dir when syslog server is not available