Logs

edited November 2014 in Installation
In my vanilla CodeIgniter applications, I can switch on logging in config.php and type within my PHP:
log_message('debug','my message');
This results in a log file in ./application/logs

It seems I can do this in Fuel too however the resulting log file never shows any of my "log_message()" calls - just the standard "you opened this model" style reports...

Should I be using this instead?
$this->fuel->logs->write('debug','my message);

If so, I don't get any logs for it anywhere.

I've not found anything specific in the Fuel User Guide regarding a code logging system different to CodeIgniter's. What am I missing?

Cheers

Comments

  • edited 4:20AM
    FUEL doesn't change the core CI Logging. The Fuel logging is actually separate so your log_message function should continue to work. However, it can write 2 log files if your system default time is different then what is set in the fuel/application/config/MY_config.php. By default, that file sets the default timezone.
    date_default_timezone_set('America/Los_Angeles');
    You'll notice that the log file with the earlier date, has all the core logging and then after the config is loaded, the second later log file is written.
Sign In or Register to comment.