Codeigniter not creating any log files

后端 未结 4 1007
野趣味
野趣味 2021-02-07 16:03

Under config.php I have:

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

In index.php

相关标签:
4条回答
  • 2021-02-07 16:27

    The directory where you want the log files to be saved needs to be writable.

    0 讨论(0)
  • 2021-02-07 16:30

    The log filename in the configuration settings needs a trailing "/" above making sure the webserver process has writeable access to the directory.

    0 讨论(0)
  • 2021-02-07 16:38

    Change the logs owner and group to what owner/group your live web server is running, give it write perms and it should work. I take it that in your local/dev server your CI folder is owned by you that is why you need to chmod it to 777 to make it work.

    0 讨论(0)
  • 2021-02-07 16:41

    I have tried a lot of solutions and finally what worked for me was this:

    Open system/libraries/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. The logs will start coming.

    I have tried a lot of other options, none worked, this is not neat approach but at least I can see my logs now.

    0 讨论(0)
提交回复
热议问题