Open MichelleBlanchette opened 1 year 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!)
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.