private function _getPath($fileName = null)
    {
        $level = $this->_level;
        if ($fileName) {
            return OPENBIZ_LOG_PATH . '/' . $fileName . $this->_extension;
        }
        switch ($this->_org) {
            case 'DATE':
                return OPENBIZ_LOG_PATH . '/' . date("Y_m_d") . $this->_extension;
            case 'LEVEL':
                $level = $this->_level2filename($level);
                return OPENBIZ_LOG_PATH . '/' . $level . $this->_extension;
            case 'LEVEL-DATE':
                $level = $this->_level2filename($level);
                //delete old log files                
                if ($this->_daystolive > 0) {
                    if (is_array(glob(OPENBIZ_LOG_PATH . '/' . $level . '-*' . $this->_extension))) {
                        foreach (glob(OPENBIZ_LOG_PATH . '/' . $level . '-*' . $this->_extension) as $filename) {
                            $mtime = filemtime($filename);
                            if ((time() - $mtime) >= $this->_daystolive * 86400) {
                                @unlink($filename);
                            }
                        }
                    }
                }
                return OPENBIZ_LOG_PATH . '/' . $level . '-' . date("Y_m_d") . $this->_extension;
            case 'PROFILE':
                $profile = Openbizx::$app->getUserProfile('USERID');
                if (!$profile) {
                    $profile = 'Guest';
                }
                return OPENBIZ_LOG_PATH . '/' . $profile . $this->_extension;
            default:
                break;
        }
    }
private function _getPath($fileName = null)
    {
        $level = $this->_level;
        if ($fileName) {
            return OPENBIZ_LOG_PATH . '/' . $fileName . $this->_extension;
        }
        switch ($this->_org) {
            case 'DATE':
                return OPENBIZ_LOG_PATH . '/' . date("Y_m_d") . $this->_extension;
            case 'LEVEL':
                $level = $this->_level2filename($level);
                return OPENBIZ_LOG_PATH . '/' . $level . $this->_extension;
            case 'LEVEL-DATE':
                $level = $this->_level2filename($level);
                //delete old log files                
                if ($this->_daystolive > 0) {
                    if (is_array(glob(OPENBIZ_LOG_PATH . '/' . $level . '-*' . $this->_extension))) {
                        foreach (glob(OPENBIZ_LOG_PATH . '/' . $level . '-*' . $this->_extension) as $filename) {
                            $mtime = filemtime($filename);
                            if ((time() - $mtime) >= $this->_daystolive * 86400) {
                                @unlink($filename);
                            }
                        }
                    }
                }
                return OPENBIZ_LOG_PATH . '/' . $level . '-' . date("Y_m_d") . $this->_extension;
            case 'PROFILE':
                $profile = Openbizx::$app->getUserProfile('USERID');
                if (!$profile) {
                    $profile = 'Guest';
                }
                return OPENBIZ_LOG_PATH . '/' . $profile . $this->_extension;
            default:
                break;
        }
    }
private function _getPath ( $ fileName = null ) { $ level = $ this -> _level ; if ( $ fileName ) { return OPENBIZ_LOG_PATH . '/' . $ fileName . $ this -> _extension ; } switch ( $ this -> _org ) { case 'DATE' : return OPENBIZ_LOG_PATH . '/' . date ( "Y_m_d" ) . $ this -> _extension ; case 'LEVEL' : $ level = $ this -> _level2filename ( $ level ) ; return OPENBIZ_LOG_PATH . '/' . $ level . $ this -> _extension ; case 'LEVEL-DATE' : $ level = $ this -> _level2filename ( $ level ) ; //delete old log files                 if ( $ this -> _daystolive > 0 ) { if ( is_array ( glob ( OPENBIZ_LOG_PATH . '/' . $ level . '-*' . $ this -> _extension ) ) ) { foreach ( glob ( OPENBIZ_LOG_PATH . '/' . $ level . '-*' . $ this -> _extension ) as $ filename ) { $ mtime = filemtime ( $ filename ) ; if ( ( time ( ) - $ mtime ) >= $ this -> _daystolive * 86400 ) { @ unlink ( $ filename ) ; } } } } return OPENBIZ_LOG_PATH . '/' . $ level . '-' . date ( "Y_m_d" ) . $ this -> _extension ; case 'PROFILE' : $ profile = Openbizx :: $ app -> getUserProfile ( 'USERID' ) ; if ( ! $ profile ) { $ profile = 'Guest' ; } return OPENBIZ_LOG_PATH . '/' . $ profile . $ this -> _extension ; default : break ; } }
Get path based on config options

@global BizSystem $g_BizSystem
@param string $fileName
@return string log_path - The path where a log entry should be written
Get path based on config options