src/Service/logService.php
public function log($priority, $package, $message)
    {
        if (OPENBIZ_DEBUG == 0 && $priority == LOG_DEBUG) {
            return true;
        }
        //Adapt PHP LOG priority
        switch ($priority) {
            case LOG_EMERG : // 	system is unusable
            case LOG_ALERT : // action must be taken immediately
            case LOG_CRIT : // critical conditions
                $level = 2;
                break;
            case LOG_ERR : // error conditions
                $level = 3;
                break;
            case LOG_WARNING : // warning conditions
                $level = 4;
                break;
            case LOG_NOTICE : //	normal, but significant, condition
            case LOG_INFO : // informational message
            case LOG_DEBUG : // debug-level message
                $level = 7;
                break;
        }
        //echo "log levels: ".LOG_EMERG.", ".LOG_ALERT.", ".LOG_CRIT.", ".LOG_ERR.", ".LOG_WARNING.", ".LOG_NOTICE.", ".LOG_INFO.", ".LOG_DEBUG."<br>";

        if ($this->_level == FALSE) {
            return true;
        }
        //Get the file path
        $this->_level = $level;
        $path = $this->_getPath($file_name);
        if (!is_file($path)) {
            @touch($path);
            @chmod($path, 0777);
        }
        if (!is_writable($path))
            return false;
        $this->prepFile($path);
        //Create the log writer object
        $writer = new \Zend_Log_Writer_Stream($path);
        $writer->setFormatter($this->_formatter);
        //Instantiate logging object
        $logger = new \Zend_Log($writer);
        //Filter log entries to those allowed by configuration
        $filter = new \Zend_Log_Filter_Priority($this->_level);
        $logger->addFilter($filter);

        $logger->setEventItem('back_trace', 'n/a');
        $logger->setEventItem('package', $package);
        $logger->setEventItem('date', date("m/d/Y"));
        $logger->setEventItem('time', date("H:i:s"));

        //Write Log Entry
        $logger->log($message, $level);
        $this->closeFile($path);
        return TRUE;
    }
public function log($priority, $package, $message)
    {
        if (OPENBIZ_DEBUG == 0 && $priority == LOG_DEBUG) {
            return true;
        }
        //Adapt PHP LOG priority
        switch ($priority) {
            case LOG_EMERG : // 	system is unusable
            case LOG_ALERT : // action must be taken immediately
            case LOG_CRIT : // critical conditions
                $level = 2;
                break;
            case LOG_ERR : // error conditions
                $level = 3;
                break;
            case LOG_WARNING : // warning conditions
                $level = 4;
                break;
            case LOG_NOTICE : //	normal, but significant, condition
            case LOG_INFO : // informational message
            case LOG_DEBUG : // debug-level message
                $level = 7;
                break;
        }
        //echo "log levels: ".LOG_EMERG.", ".LOG_ALERT.", ".LOG_CRIT.", ".LOG_ERR.", ".LOG_WARNING.", ".LOG_NOTICE.", ".LOG_INFO.", ".LOG_DEBUG."<br>";

        if ($this->_level == FALSE) {
            return true;
        }
        //Get the file path
        $this->_level = $level;
        $path = $this->_getPath($file_name);
        if (!is_file($path)) {
            @touch($path);
            @chmod($path, 0777);
        }
        if (!is_writable($path))
            return false;
        $this->prepFile($path);
        //Create the log writer object
        $writer = new \Zend_Log_Writer_Stream($path);
        $writer->setFormatter($this->_formatter);
        //Instantiate logging object
        $logger = new \Zend_Log($writer);
        //Filter log entries to those allowed by configuration
        $filter = new \Zend_Log_Filter_Priority($this->_level);
        $logger->addFilter($filter);

        $logger->setEventItem('back_trace', 'n/a');
        $logger->setEventItem('package', $package);
        $logger->setEventItem('date', date("m/d/Y"));
        $logger->setEventItem('time', date("H:i:s"));

        //Write Log Entry
        $logger->log($message, $level);
        $this->closeFile($path);
        return TRUE;
    }
The primary log function that will take an incoming message and specified paramter and log in the
appropriate location and format

@param int $level - Follow common BSD error levels
@param string $package - A way to group log messages
@param string $message - The actual message to log
@return boolean -TRUE on success otherwise FALSE