Changeset 17899

Show
Ignore:
Timestamp:
10/03/08 16:58:05 (2 months ago)
Author:
bergie
Message:

Make MidCOM less chatty

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/midcom/application.php

    r17898 r17899  
    709709    public function finish() 
    710710    { 
    711         debug_push_class(__CLASS__, __FUNCTION__); 
    712711        $this->_status = MIDCOM_STATUS_CLEANUP; 
    713712 
     
    731730        $this->cache->shutdown(); 
    732731 
    733         debug_add('Flushing...'); 
    734732        // This is here to avoid trouble with end-of-processing segfaults. Will block AFAIK 
    735733        flush(); 
    736         debug_pop(); 
    737  
    738734        debug_add("End of MidCOM run: {$_SERVER['REQUEST_URI']}", MIDCOM_LOG_INFO); 
    739735    } 
     
    771767     * @access private 
    772768     */ 
    773     private function _process() { 
    774         debug_push_class(__CLASS__, __FUNCTION__); 
    775  
     769    private function _process()  
     770    { 
    776771        $success = false; 
    777772        $substyle = ""; 
     
    785780                    case 'substyle': 
    786781                        $substyle = $value; 
     782                        debug_push_class(__CLASS__, __FUNCTION__); 
    787783                        debug_add("Substyle '$substyle' selected", MIDCOM_LOG_INFO); 
     784                        debug_pop(); 
    788785                        break; 
    789786 
     
    792789                        if ($this->_parser->argc > 1) 
    793790                        { 
     791                            debug_push_class(__CLASS__, __FUNCTION__); 
    794792                            debug_add('Too many arguments remaining for serve_attachment.', MIDCOM_LOG_ERROR); 
     793                            debug_pop(); 
    795794                        } 
    796  
    797                         debug_add("Trying to serve Attachment with GUID {$value}", MIDCOM_LOG_INFO); 
    798795 
    799796                        $attachment = new midcom_baseclasses_database_attachment($value); 
     
    839836                        { 
    840837                            $this->cache->content->no_cache(); 
     838                        } 
     839                        else 
     840                        { 
     841                            $this->generate_error(MIDCOM_ERRNOTFOUND, "Invalid cache request URL."); 
     842                            // This will exit; 
    841843                        } 
    842844                        break; 
     
    904906 
    905907                    case 'log': 
    906                         if ($this->_parser->argc > 1) { 
     908                        if ($this->_parser->argc > 1)  
     909                        { 
     910                            debug_push_class(__CLASS__, __FUNCTION__);                         
    907911                            debug_add("Too many arguments remaining for debuglog.", MIDCOM_LOG_ERROR); 
     912                            debug_pop(); 
    908913                            $this->generate_error(MIDCOM_ERRNOTFOUND, "Failed to access debug log: Too many arguments for debuglog"); 
     914                            // This will exit 
    909915                        } 
    910916                        $this->_showdebuglog($value); 
     
    939945                || !$object->guid ) 
    940946            { 
    941                 debug_add("Root node missing.", MIDCOM_LOG_ERROR); 
    942                 $this->generate_error(MIDCOM_ERRCRIT, "Root node missing."); 
     947                debug_push_class(__CLASS__, __FUNCTION__); 
     948                debug_add('Root node missing.', MIDCOM_LOG_ERROR); 
     949                debug_pop(); 
     950                $this->generate_error(MIDCOM_ERRCRIT, 'Root node missing.'); 
    943951            } 
    944952 
     
    951959            { 
    952960                $path = 'midcom.core.nullcomponent'; 
    953                 debug_add("No component defined for this node.", MIDCOM_LOG_ERROR); 
    954                 debug_print_r("Root node:",$object,MIDCOM_LOG_DEBUG); 
     961                debug_push_class(__CLASS__, __FUNCTION__); 
     962                debug_add("No component defined for this node, using 'midcom.core.nullcomponent' instead.", MIDCOM_LOG_ERROR); 
     963                debug_pop(); 
    955964            } 
    956965 
     
    10091018            && $this->skip_page_style == true) 
    10101019        { 
    1011             debug_add('We are in skip_page_style mode and context 0 is active. Executing the output handler and exiting afterwards.'); 
     1020            //debug_push_class(__CLASS__, __FUNCTION__); 
     1021            //debug_add('We are in skip_page_style mode and context 0 is active. Executing the output handler and exiting afterwards.'); 
     1022            //debug_pop(); 
    10121023            $this->_status = MIDCOM_STATUS_CONTENT; 
    10131024 
    10141025            // Enter Context 
    1015             debug_add("Entering Context 0 (old Context: $this->_currentcontext)", MIDCOM_LOG_DEBUG); 
     1026            //debug_add("Entering Context 0 (old Context: $this->_currentcontext)", MIDCOM_LOG_DEBUG); 
    10161027            $oldcontext = $this->_currentcontext; 
    10171028            $this->_currentcontext = 0; 
     
    10211032 
    10221033            // Leave Context 
    1023             debug_add("Leaving Context 0 (new Context: $oldcontext)", MIDCOM_LOG_DEBUG); 
     1034            //debug_add("Leaving Context 0 (new Context: $oldcontext)", MIDCOM_LOG_DEBUG); 
    10241035            $this->style->leave_context(); 
    10251036            $this->_currentcontext = $oldcontext; 
     
    10301041        else 
    10311042        { 
    1032             debug_add("_process finished successfully", MIDCOM_LOG_DEBUG); 
     1043            //debug_push_class(__CLASS__, __FUNCTION__); 
     1044            //debug_add("_process finished successfully", MIDCOM_LOG_DEBUG); 
    10331045            $this->_status = MIDCOM_STATUS_CONTENT; 
    1034             debug_pop(); 
     1046            //debug_pop(); 
    10351047        } 
    10361048    } 
     
    11381150    private function _can_handle($object) 
    11391151    { 
    1140         debug_push_class(__CLASS__, __FUNCTION__); 
    1141  
    11421152        $path = $this->get_context_data(MIDCOM_CONTEXT_COMPONENT); 
    11431153 
     
    11451155        if ($this->_context[$this->_currentcontext][MIDCOM_CONTEXT_REQUESTTYPE] != MIDCOM_REQUEST_CONTENT) 
    11461156        { 
     1157            debug_push_class(__CLASS__, __FUNCTION__); 
    11471158            debug_add("Unkown Request Type encountered:" . $this->_context[$this->current_context][MIDCOM_CONTEXT_REQUESTTYPE], MIDCOM_LOG_ERROR); 
    11481159            debug_pop(); 
     
    11641175        if (! $component_interface->configure($config, $this->_currentcontext)) 
    11651176        { 
     1177            debug_push_class(__CLASS__, __FUNCTION__); 
    11661178            debug_add ("Component Configuration failed: " . $component_interface->errstr($this->_currentcontext), MIDCOM_LOG_ERROR); 
    11671179            debug_pop(); 
     
    11721184        if (!$component_interface->can_handle($object, $this->_parser->argc, $this->_parser->argv, $this->_currentcontext)) 
    11731185        { 
     1186            debug_push_class(__CLASS__, __FUNCTION__); 
    11741187            debug_add("Component {$path} in {$object->name} declared unable to handle request.", MIDCOM_LOG_INFO); 
    11751188            debug_pop(); 
     
    11771190        } 
    11781191 
    1179         debug_add("Component {$path} in {$object->name} will handle request.", MIDCOM_LOG_INFO); 
    1180         debug_pop(); 
     1192        //debug_add("Component {$path} in {$object->name} will handle request.", MIDCOM_LOG_INFO); 
     1193        //debug_pop(); 
    11811194        return true; 
    11821195    } 
  • trunk/midcom/midcom.core/midcom/services/_i18n_l10n.php

    r17439 r17899  
    243243        if (! file_exists($filename)) 
    244244        { 
    245             debug_push_class(__CLASS__, __FUNCTION__); 
    246             debug_add("{$filename} does not exist, creating an empty language array therefore."); 
     245            //debug_push_class(__CLASS__, __FUNCTION__); 
     246            //debug_add("{$filename} does not exist, creating an empty language array therefore."); 
    247247            $this->_stringdb[$lang] = Array(); 
    248             debug_pop(); 
     248            //debug_pop(); 
    249249            return; 
    250250        } 
  • trunk/midcom/midcom.core/midcom/services/auth.php

    r17839 r17899  
    488488    function initialize() 
    489489    { 
    490         debug_push_class(__CLASS__, __FUNCTION__); 
    491  
    492490        $this->sessionmgr = new midcom_services_auth_sessionmgr($this); 
    493491         
    494         // Midgard 1.9 compatibility: ensure that Midgard's sitegroup ID is always int 
     492        // Midgard 8.09beta compatibility: ensure that Midgard's sitegroup ID is always int 
    495493        if (!is_integer($_MIDGARD['sitegroup'])) 
    496494        { 
     
    506504            $this->_check_for_active_login_session(); 
    507505        } 
    508  
    509         debug_pop(); 
    510506    } 
    511507 
     
    821817        if (!isset($cached_privileges[$privilege_key])) 
    822818        { 
    823             debug_push_class(__CLASS__, __FUNCTION__); 
    824             debug_add("Cache {$privilege_key} miss, fetching privileges for {$object_guid}"); 
    825             debug_pop(); 
     819            //debug_push_class(__CLASS__, __FUNCTION__); 
     820            //debug_add("Cache {$privilege_key} miss, fetching privileges for {$object_guid}"); 
     821            //debug_pop(); 
    826822            $full_privileges = $this->get_privileges_byguid($object_guid, $object_class, $for_user); 
    827823            foreach ($full_privileges as $priv => $value) 
     
    11231119        else 
    11241120        { 
    1125             debug_push_class(__CLASS__, __FUNCTION__); 
    1126             debug_add("Cache miss for {$cache_id}"); 
    1127             debug_pop(); 
     1121            //debug_push_class(__CLASS__, __FUNCTION__); 
     1122            //debug_add("Cache miss for {$cache_id}"); 
     1123            //debug_pop(); 
    11281124            if (   is_object($user) 
    11291125                && method_exists($user, 'get_privileges') 
  • trunk/midcom/midcom.core/midcom/services/auth/backend/simple.php

    r17697 r17899  
    6666        if (! array_key_exists($this->_cookie_id, $_COOKIE)) 
    6767        { 
    68             debug_push_class(__CLASS__, __FUNCTION__); 
    69             debug_add('There is no cookie, we cannot read the login session.'); 
    70             debug_pop(); 
     68            //debug_push_class(__CLASS__, __FUNCTION__); 
     69            //debug_add('There is no cookie, we cannot read the login session.'); 
     70            //debug_pop(); 
    7171            return false; 
    7272        } 
  • trunk/midcom/midcom.core/midcom/services/cache/module/content.php

    r17898 r17899  
    12521252            } 
    12531253 
    1254             debug_push_class(__CLASS__, __FUNCTION__); 
    1255             debug_add("Setting last modified to " . gmdate('c', $time)); 
    1256             debug_pop(); 
     1254            //debug_push_class(__CLASS__, __FUNCTION__); 
     1255            //debug_add("Setting last modified to " . gmdate('c', $time)); 
     1256            //debug_pop(); 
    12571257 
    12581258            $header = "Last-Modified: " . gmdate('D, d M Y H:i:s', $time) . ' GMT'; 
  • trunk/midcom/midcom.core/midcom/services/i18n.php

    r17558 r17899  
    551551            $this->_current_language = $this->_cookie_data['language']; 
    552552            $this->_current_charset = $this->_cookie_data['charset']; 
    553             debug_push_class(__CLASS__, __FUNCTION__); 
    554             debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (source: cookie)", MIDCOM_LOG_INFO); 
    555             debug_pop(); 
     553            //debug_push_class(__CLASS__, __FUNCTION__); 
     554            //debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (source: cookie)", MIDCOM_LOG_INFO); 
     555            //debug_pop(); 
    556556            return; 
    557557        } 
     
    562562        { 
    563563            $this->_current_language = $content_language; 
    564             debug_push_class(__CLASS__, __FUNCTION__); 
    565             debug_add("Set current language to {$this->_current_language} (source: Midgard host language)", MIDCOM_LOG_INFO); 
    566             debug_pop(); 
     564            //debug_push_class(__CLASS__, __FUNCTION__); 
     565            //debug_add("Set current language to {$this->_current_language} (source: Midgard host language)", MIDCOM_LOG_INFO); 
     566            //debug_pop(); 
    567567            return; 
    568568        } 
     
    580580            } 
    581581        } 
    582         debug_push_class(__CLASS__, __FUNCTION__); 
    583         debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (Source: HTTP)", MIDCOM_LOG_INFO); 
    584         debug_pop(); 
     582        //debug_push_class(__CLASS__, __FUNCTION__); 
     583        //debug_add("Set current language to {$this->_current_language} with charset {$this->_current_charset} (Source: HTTP)", MIDCOM_LOG_INFO); 
     584        //debug_pop(); 
    585585    } 
    586586