The MU forums have moved to WordPress.org

Error Reporter (7 posts)

  1. eminemjamesuk
    Member
    Posted 17 years ago #

    How about something that sends an email to you everytime a user hits an error...and it also tells you what error is encountered.

    Has this been done already? Thanks

  2. lunabyte
    Member
    Posted 17 years ago #

    Define "hits an error".

    Like a 404 error, or a code error that's handled by the WP Error functions?

  3. eminemjamesuk
    Member
    Posted 17 years ago #

    Both. Or an error involving plugins....

  4. lunabyte
    Member
    Posted 17 years ago #

    For a 404, it wouldn't be hard.

    - Make sure a 404 template exists in all themes.
    - Make a plugin that does something like:

    if ( is_404() ) {
    wp_mail(xxxx);
    }
    

    You'll have to set some parameters, etc, but that would send an email to the blog's admin for 404 errors.

    You'd have to find a hook in the error processing functions to grab into, and then use a plugin in a similar manner.

    add_action('the_error_hook', 'my_email_function');
    function my_email_function() {
    the email function call and params here
    }
    
  5. Ovidiu
    Member
    Posted 17 years ago #

    I know of two plugins that could be used to do this.

    one stores 404 logs into a table and the other one offers you the option to get them by mail so I gues you can easily modify that plugin to send mail to you and hide the admin interface from the users.

    http://alexking.org/projects/wordpress
    http://mattread.com/projects/wp-plugins/log-404/

  6. drmike
    Member
    Posted 17 years ago #

    There's also an error_log in the root of the WPMu install. If you don't have one, go ahead and create the file and assign it a file permission of 666.

  7. lunabyte
    Member
    Posted 17 years ago #

    If it were me, as a site admin, I wouldn't really want 404's from every single site. WP errors I might though.

About this Topic

  • Started 17 years ago by eminemjamesuk
  • Latest reply from lunabyte