PurpleTurtleCreative / completionist

Asana integration plugin for WordPress.
https://purpleturtlecreative.com/completionist/
GNU General Public License v3.0
1 stars 0 forks source link

Improve logging and log visibility #134

Open MichelleBlanchette opened 1 year ago

MichelleBlanchette commented 1 year ago

Refer to WordPress's usage in the source code of this function: https://developer.wordpress.org/reference/functions/_deprecated_function/

The trigger_error() function has all the verbosity I've been wanting, such as the file and line number where called.

Applicable constants are here: https://www.php.net/manual/en/errorfunc.constants.php

~Should also probably wrap error logging within checks for if ( WP_DEBUG ) like WordPress core does, as well.~ 🤷 ^ No, because I don't want to require this to help debug something for someone.

MichelleBlanchette commented 11 months ago

Better yet, all logging should be handled custom and visible in an admin screen for the plugin! Logging to the server doesn't help with support requests where I simply gain access to their WordPress admin. (And I definitely don't want SSH access to their server, anyways!)