[wp-hackers] Cron Improvements and Error Logging
Andy Skelton
skeltoac at gmail.com
Thu Mar 9 08:25:57 GMT 2006
On 3/9/06, Robert Deaton <false.hopes at gmail.com> wrote:
> dirty outline of my ideas, I'm looking for constructive criticism,
> improvements on ideas, and maybe even downplaying the ideas if you can
> provide some other argument than "I don't like it". In case this gets
Cron: I like the idea as a plugin but I would not force such a complex
thing as that into software I would encourage my mother to use. I hate
answering her questions with "ignore that feature. It's not for you."
That's not to say I wouldn't value such a thing myself. if you wrote
that plugin I would use it personally.
Logging: interesting. Not my cup of tea, but certainly useful to many.
I think if you kept it to critical problems, such as might cause a
person to show up at the forums, it could be worthwhile. However,
adding an error log viewer to the admin interface doesn't fly in my
mind, and you don't want to expose this kind of log to public access.
The beginnings of a simple solution for core:
function wp_log_error($level = 1) {
if ($level >= WP_LOG_LEVEL)
do_action('log_error', func_get_args());
}
Then go through the code and find all the places where you have your
ugly die() calls and call this instead. I don't know what else you'd
want core to do with errors besides make them available to plugins and
maybe standardize its error messages.
Not that fatal errors are a problem for anyone other than devs or
people installing plugins or themes, but I did have a method of nice
fatal error reporting: ob_start, output the error message, try the
action, ob_end_clean. A fatal error in the middle will flush the
buffered error message to the browser.
Andy
More information about the wp-hackers
mailing list