![]() |
Profiler: What Views loaded - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Profiler: What Views loaded (/showthread.php?tid=57837) |
Profiler: What Views loaded - El Forum - 04-15-2013 [eluser]dmayo2[/eluser] When you enable and output the Profiler info, it can be quite informative. However, for the life of me I can't seem to find any way to get what View(s) have been loaded. Any ideas? Thanks. Profiler: What Views loaded - El Forum - 04-16-2013 [eluser]Harold Villacorte[/eluser] The Loader.php class line #836 puts out a debug log message for each file that is loaded. Profiler: What Views loaded - El Forum - 04-16-2013 [eluser]dmayo2[/eluser] Thanks for that tip. I'm able to output the log, but I'm having a tough time getting to the view that's loaded. I put the log output class call in the controller, but my output stops when the controller class has been initialized, and the loading of the view comes after that. So, I tried to move the call to the view itself to no avail. Any additional thoughts? Here's a complete output of the log when viewed after the entire page renders in browser. By putting my call in the controller, I don't get the last (top 5 as the array has been krsort-ed) [20] => DEBUG - 2013-04-16 12:29:50 --> Total execution time: 0.0544 [21] => DEBUG - 2013-04-16 12:29:50 --> Final output sent to browser [22] => DEBUG - 2013-04-16 12:29:50 --> Helper loaded: text_helper [23] => DEBUG - 2013-04-16 12:29:50 --> Language file loaded: language/english/profiler_lang.php [24] => DEBUG - 2013-04-16 12:29:50 --> File loaded: /.../application/views/welcome_message.php [25] => DEBUG - 2013-04-16 12:29:50 --> Controller Class Initialized [26] => DEBUG - 2013-04-16 12:29:50 --> Database Driver Class Initialized [27] => DEBUG - 2013-04-16 12:29:50 --> Helper loaded: form_helper [28] => DEBUG - 2013-04-16 12:29:50 --> Helper loaded: url_helper [29] => DEBUG - 2013-04-16 12:29:50 --> Loader Class Initialized [30] => DEBUG - 2013-04-16 12:29:50 --> Language Class Initialized [31] => DEBUG - 2013-04-16 12:29:50 --> Global POST and COOKIE data sanitized [32] => DEBUG - 2013-04-16 12:29:50 --> CRSF cookie Set [33] => DEBUG - 2013-04-16 12:29:50 --> XSS Filtering completed [34] => DEBUG - 2013-04-16 12:29:50 --> XSS Filtering completed [35] => DEBUG - 2013-04-16 12:29:50 --> XSS Filtering completed [36] => DEBUG - 2013-04-16 12:29:50 --> Input Class Initialized [37] => DEBUG - 2013-04-16 12:29:50 --> Security Class Initialized [38] => DEBUG - 2013-04-16 12:29:50 --> Output Class Initialized [39] => DEBUG - 2013-04-16 12:29:50 --> Router Class Initialized [40] => DEBUG - 2013-04-16 12:29:50 --> URI Class Initialized [41] => DEBUG - 2013-04-16 12:29:50 --> UTF-8 Support Enabled [42] => DEBUG - 2013-04-16 12:29:50 --> Utf8 Class Initialized [43] => DEBUG - 2013-04-16 12:29:50 --> Hooks Class Initialized [44] => DEBUG - 2013-04-16 12:29:50 --> Config Class Initialized Profiler: What Views loaded - El Forum - 04-16-2013 [eluser]Harold Villacorte[/eluser] You can just extend the Log class. Here is a quick and dirty: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Code: var_dump($this->log->view_files_loaded); Profiler: What Views loaded - El Forum - 04-23-2013 [eluser]InsiteFX[/eluser] Open up and view the .system/libaries/Profiler.php and you will see what is going on. It does not output to a view, it just outputs html code. |