Codeigniter not creating any log files

Viewed 26264

Under config.php I have:

$config['log_threshold'] = 4;
$config['log_path'] = '/home/myaccount/logFilesFolder';

In index.php I have:

error_reporting(E_ALL);

The only way I can seem to get anything to log is if I chmod that directory to rwx (777), which doesn't seem right to me. That and it doesn't see to be logging all the errors.

In my local/dev environment it seems to be working but on my production server nothing is being logged. I can't seem to figure out why.

5 Answers

I had the same problem with my Codeigniter 4 project. The log was created successfully in my local window machine but was not creating on the remote Linux machine. I was using a custom path to generate log files under the 'app' folder. So what I did is to change the settings in my config/Logger.php file back to

'path' => WRITEPATH.'logs/',

and it created the log files under writeable/logs folder.

Related