1

I am running codeigniter framework and I've come across a peculiar problem. Even though I have turned logging 'on', no log files are being generated.

Looking at responses to similar questions on this forum, I did the following:

  • Created a new folder with 777 permissions and "apache" as the owner
  • Specified this folder as the logging destination
  • Set logging threshold as 4

Below are the excerpts from the settings file:

*/
$config['log_threshold'] = 4;
$config['log_path'] = '/logtest/';
/*

Here are the permissions details of the log directory:
drwxrwxrwx. 2 apache apache 6 8月 12 09:28 logtest

Even with these settings I'm not seeing any files being generated in the log folder. Could someone please guide me on how to fix this, or direct me to settings that I should be looking at?

Edit: I'm running version 2.2.0 of CodeIgniter

Thanks,

  • Open system/core/Log.php and change the following lines; set the value of: $this->log_path to a writable directory, preferably home directory so that there are no permission issues. If you want to change the filename also, search for the variable $filepath and change the name. Example: $this->log_path = '/log'; touch /log/ restart the webserver.not best the best one – Linus Aug 12 '15 at 01:49
  • @Anmol Raghuvanshi: There's no "Log.php" in the system/core folder. I'm running ver 2.2.0 of CodeIgniter. – Anurag Singh Aug 12 '15 at 01:58
  • i am using CI-3 then you should check on libraries folder – Linus Aug 12 '15 at 02:01
  • have a look http://stackoverflow.com/questions/3209807/how-to-do-error-logging-in-codeigniter-php – Linus Aug 12 '15 at 02:21
  • I made the changes you suggested to no avail. No log files are being generated. I have no idea where to look for reasons as to why logfile creation isn't happening. – Anurag Singh Aug 12 '15 at 05:56

1 Answers1

0

Keep in mind that you have set your log_path to the root of your hardisk. Try:

$config['log_path'] = BASEPATH.'logtest';