CodeIgniter Forums
Can't seem to write to LOG... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Can't seem to write to LOG... (/showthread.php?tid=59761)



Can't seem to write to LOG... - El Forum - 11-14-2013

[eluser]duartix[/eluser]
I'm using PHP 5.5.1 and CodeIgniter 2.1.4-

On one of my controllers, I've got the following code:
Code:
public function logout() {
        error_log("LOGOUT!");
    }

The problem is that this "LOGOUT!" message never appears in my log file: C:\xampp\htdocs\glup2\application\logs\log-2013-11-14.php

I've tried raising the error log threshold, but it's still not working.
My config.php is as follows:

Code:
$config['log_threshold'] = 4;
$config['log_path'] = '';
$config['log_date_format'] = 'Y-m-d H:i:s';


All sorts of debug messages (like class loading and helper loads) get to the log, but not my LOGOUT message.
Any ideas on what I'm doing wrong?
TIA.


Can't seem to write to LOG... - El Forum - 11-14-2013

[eluser]duartix[/eluser]
Solved.
Switched from error_log (PHP) to log_message (CodeIgniter).
It's working now.