CodeIgniter Forums

Full Version: Add start to debug log (using tail)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

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

El Forum

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

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

El Forum

[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).

El Forum

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

El Forum

[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]