Changeset 652

Show
Ignore:
Timestamp:
10/04/2007 08:10:40 PM (12 months ago)
Author:
Shadowhand
Message:

A few small changes:

  • Cleaned up debug logging
  • Changed Kohana::display() to be run in the "system.shutdown" Event
  • Changed Bootstrap to call "system.shutdown" as the last operation
Location:
trunk/system
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Bootstrap.php

    r651 r652  
    6262 
    6363// Manually flush the output buffer to allow loading views in the system.output event 
    64 Kohana::display(); 
     64Event::run('system.shutdown'); 
  • trunk/system/core/Kohana.php

    r651 r652  
    132132                set_exception_handler(array('Kohana', 'exception_handler')); 
    133133 
    134                 // Set shutdown handler to run the 'system.shutdown' event 
    135                 register_shutdown_function(array('Event', 'run'), 'system.shutdown'); 
    136  
    137134                if (function_exists('date_default_timezone_set')) 
    138135                { 
     
    170167                } 
    171168 
     169                // Enable routing 
     170                Event::add('system.routing', array('Router', 'setup')); 
     171 
     172                // Enabel loading a Kohana instance 
     173                Event::add('system.execute', array('Kohana', 'instance')); 
     174 
    172175                // Enable log writing if the log threshold is enabled 
    173176                if(Config::item('log.threshold') > 0) 
     
    176179                } 
    177180 
    178                 // Enable routing 
    179                 Event::add('system.routing', array('Router', 'setup')); 
    180  
    181                 // Enabel loading a Kohana instance 
    182                 Event::add('system.execute', array('Kohana', 'instance')); 
     181                Event::add('system.shutdown', array('Kohana', 'display')); 
    183182 
    184183                // Setup is complete 
  • trunk/system/libraries/Calendar.php

    r644 r652  
    6161                } 
    6262 
    63                 Log::add('debug', 'Calendar Class Initialized'); 
     63                Log::add('debug', 'Calendar Library initialized'); 
    6464        } 
    6565 
  • trunk/system/libraries/Database.php

    r644 r652  
    118118                        throw new Kohana_Exception('database.driver_not_supported', 'Database drivers must use the Database_Driver interface.'); 
    119119 
    120                 Log::add('debug', 'Database Class Initialized'); 
     120                Log::add('debug', 'Database Library initialized'); 
    121121        } 
    122122 
  • trunk/system/libraries/Encrypt.php

    r644 r652  
    4646                $this->mcrypt_exists = function_exists('mcrypt_encrypt'); 
    4747 
    48                 Log::add('debug', 'Encrypt Class Initialized'); 
     48                Log::add('debug', 'Encrypt Library initialized'); 
    4949        } 
    5050 
  • trunk/system/libraries/Ftp.php

    r644 r652  
    5454                } 
    5555 
    56                 Log::add('debug', 'FTP Class Initialized'); 
     56                Log::add('debug', 'FTP Library initialized'); 
    5757        } 
    5858 
  • trunk/system/libraries/Image_lib.php

    r644 r652  
    9898                } 
    9999 
    100                 Log::add('debug', 'Image Lib Class Initialized'); 
     100                Log::add('debug', 'Image Lib Library initialized'); 
    101101        } 
    102102 
  • trunk/system/libraries/Input.php

    r649 r652  
    5757                $this->_sanitize_globals(); 
    5858 
    59                 Log::add('debug', 'Input Class Initialized'); 
     59                Log::add('debug', 'Input Library initialized'); 
    6060        } 
    6161 
  • trunk/system/libraries/Pagination.php

    r644 r652  
    7676                 
    7777                // Initialization done 
    78                 Log::add('debug', 'Pagination Class Initialized'); 
     78                Log::add('debug', 'Pagination Library initialized'); 
    7979        } 
    8080         
  • trunk/system/libraries/Session.php

    r651 r652  
    9595                Event::add('system.output', 'session_write_close'); 
    9696 
    97                 Log::add('debug', 'Session Class Initialized'); 
     97                Log::add('debug', 'Session Library initialized'); 
    9898        } 
    9999 
  • trunk/system/libraries/Upload.php

    r648 r652  
    7070                } 
    7171 
    72                 Log::add('debug', 'Upload Class Initialized'); 
     72                Log::add('debug', 'Upload Library initialized'); 
    7373        } 
    7474 
  • trunk/system/libraries/User_agent.php

    r648 r652  
    110110                } 
    111111 
    112                 Log::add('debug', 'User Agent Class Initialized'); 
     112                Log::add('debug', 'User Agent Library initialized'); 
    113113        } 
    114114 
  • trunk/system/libraries/View.php

    r648 r652  
    6363                        } 
    6464                } 
     65 
     66                Log::add('debug', 'View Class Initialized ['.str_replace(DOCROOT, '', $this->kohana_filename).']'); 
    6567        } 
    6668