CodeIgniter Forums
Add start to debug log (using tail) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Add start to debug log (using tail) (/thread-7766.html)



Add start to debug log (using tail) - El Forum - 04-22-2008

[eluser]louis w[/eluser]
I am using tail so that I can watch the debug execute live in the terminal so I do not have to keep opening it.
Code:
tail -f 100 log-2008-04-22.php

I would like to add a debug message at the very beginning (or end) of the CI chain of log message so that I can easily see where the latest request started.

What would be the best way to do this without hacking the core.


Add start to debug log (using tail) - El Forum - 04-22-2008

[eluser]webthink[/eluser]
Put it right in the bootstrap file?


Add start to debug log (using tail) - El Forum - 04-22-2008

[eluser]louis w[/eluser]
Do you mean my index.php file?

[quote author="webthink" date="1208896091"]Put it right in the bootstrap file?[/quote]


Add start to debug log (using tail) - El Forum - 04-22-2008

[eluser]m4rw3r[/eluser]
The log_message() function is not loaded yet in the index.php (you can call it after the include of codeigniter.php (or more exact: the common.php file), but not before).


Add start to debug log (using tail) - El Forum - 04-22-2008

[eluser]webthink[/eluser]
Yeah, as it's first and last to load. [edit: guess not ^^ Smile]


Add start to debug log (using tail) - El Forum - 04-22-2008

[eluser]louis w[/eluser]
Thanks m.

[quote author="m4rw3r" date="1208896798"]The log_message() function is not loaded yet in the index.php (you can call it after the include of codeigniter.php (or more exact: the common.php file), but not before).[/quote]