Exemple #1
0
 /**
  * Get the singleton instance of this class and enable writing at shutdown.
  * This can be different from the default Kohana logger
  *
  *     $log = Minion_Log::instance();
  *
  * @return  Minion_Log
  */
 public static function instance()
 {
     if (Minion_Log::$_instance === NULL) {
         // Create a new instance
         Minion_Log::$_instance = new Minion_Log();
         // Write the logs at shutdown
         register_shutdown_function(array(Minion_Log::$_instance, 'write'));
     }
     return Minion_Log::$_instance;
 }