Support » Plugin: Error Log Monitor » managing error files?

  • andrew55

    (@andrew55)


    I am happy to stumbled across this plugin!

    After install, I got message “To enable error logging, create an empty file named “php-errors.log”…”

    I did this, and now I’m able to access errors.

    But, what about the other error logs created in WordPress? When I clear log in the newly created error file, will this also clear my other other log files?

    I’m asking because I keep finding error logs in directories in WordPress. I want to know about the errors, but half the time I only find these error logs by luck. And, they can get big really fast.

    If these logs aren’t cleared when I clear your plugin’s file, then maybe I can make adjustments to my hosting account to where I can set this plugin up without needing to create new error log file. If so, and suggestions on what might be preventing plugin from installing properly (so it can be used without having to create new log file)?

    Thanks for any clarification.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    At the moment, this plugin only uses one log file. It won’t display information from your other log files, and clicking the “Clear Log” button will clear only the file that’s displayed in the widget.

    If these logs aren’t cleared when I clear your plugin’s file, then maybe I can make adjustments to my hosting account to where I can set this plugin up without needing to create new error log file. If so, and suggestions on what might be preventing plugin from installing properly (so it can be used without having to create new log file)?

    The message about creating a new file shows up in two situations:

    1. Error logging is turned off.
    2. The log file name is not set, or is set to a relative file name, or the file is inaccessible/doesn’t exist.

    You don’t always need to create a new log file just for this plugin. Here’s what I would suggest:

    First, enable error logging by turning on the log_errors PHP configuration option. The plugin says to do that by adding code to wp-config.php, but that advice is mainly aimed at people on shared hosting who don’t have the ability to adjust the server configuration. If you can edit php.ini, you can enable logging site- or server-wide.

    Then, set the location of the log file by changing the error_log option. Again, the default is to use php-errors.log, but you can choose your own file name and location. The important bits are to:

    • Make sure the log file is writable by PHP. This usually means you have to create the file yourself and make sure it has the right owner, group, and access permissions.
    • Use an absolute file path. This ensures all errors will be logged in the same file, not in a bunch of different files in random locations.

    Depending on your hosting provider, you might be able to change the log_errors and error_log options for a specific site, the entire server, each installed PHP version, or not at all.

    andrew55

    (@andrew55)

    Thanks for the clarification and instruction.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘managing error files?’ is closed to new replies.