/** * Save all currently logged messages. * * @return void */ public static function save() { if (empty(Kohana_Log::$messages)) { return; } foreach (Kohana_Log::$drivers as $driver) { // We can't throw exceptions here or else we will get a // Exception thrown without a stack frame error try { $driver->save(Kohana_Log::$messages); } catch (Exception $e) { } } // Reset the messages Kohana_Log::$messages = array(); }