pre_system hook |
[eluser]jonyr[/eluser]
Hey Tomcode! Thanks for your answer. I really aprecciate it. 1 - Thanks for remember the logging. 2 - You're right I rename my hook class from my_cache to smart_cache 3 - For some reason, that I could not detect pre_system is launched two times. The new scenario is ------------------- ——/application/config/config.php——- $config[‘enable_hooks’] = TRUE; $config['log_threshold'] = 2; ——/application/config/hooks.php—— My hook configuration is $hook['pre_system'][] = array( 'class' => 'site_offline_hook', 'function' => 'is_offline', 'filename' => 'site_offline_hook.php', 'filepath' => 'hooks' ); $hook['pre_system'][] = array( 'class' => 'smart_cache', 'function' => 'pre_cache', 'filename' => 'smart_cache_hook.php', 'filepath' => 'hooks' ); $hook['post_system'] = array( 'class' => 'smart_cache', 'function' => 'post_cache', 'filename' => 'smart_cache_hook.php', 'filepath' => 'hooks' ); Right now, I'm using logg_message as you recomended me. public function pre_cache() { log_message('debug','smart_cache pre_cache function'); } public function pre_cache() { log_message('debug','smart_cache post_cache function'); } ---------------------------------------------------------------- Later of this, I ask for http://mydomain.com/index.php/welcome/index and see into my log file DEBUG - 2010-02-20 00:45:19 --> smart_cache pre_cache function DEBUG - 2010-02-20 00:45:20 --> smart_cache post_cache function DEBUG - 2010-02-20 00:45:20 --> smart_cache pre_cache function ¿What am I doing wrong? Thanks in advance, JonyR |
Messages In This Thread |
pre_system hook - by El Forum - 02-19-2010, 07:42 PM
pre_system hook - by El Forum - 02-19-2010, 09:16 PM
pre_system hook - by El Forum - 02-19-2010, 09:55 PM
pre_system hook - by El Forum - 02-19-2010, 10:04 PM
|