[wp-trac] Re: [WordPress Trac] #5669: Provide single logging
functions to replace logIO(), debug_fwrite() etc.
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 3 23:53:41 GMT 2008
#5669: Provide single logging functions to replace logIO(), debug_fwrite() etc.
-----------------------------------------------------------------+----------
Reporter: pishmishy | Owner: darkdragon
Type: enhancement | Status: new
Priority: normal | Milestone: 2.6
Component: General | Version: 2.3.2
Severity: normal | Resolution:
Keywords: logging logIO debug_fwrite dubug audit dev-feedback |
-----------------------------------------------------------------+----------
Comment (by darkdragon):
I can't think of any one solution that would best implement this, so I'm
just going to develop each of my ideas and have the core team choose the
best one that works best.
The ideas I have so far.
1. A file that is included if WP_DEBUG is defined and {{{wp-
content/debug.php}}} exists. A function will exist that will call the
functions in that file or fail if WP_DEBUG is not defined and wp-
content/debug.php doesn't exist.
The reason for this method is that, you'll want the function definition
early enough to catch any mistakes during the installation. This kind of
prevents the functions going into pluggable.php.
2. If installation errors are not important, then a pluggable function can
go into pluggable.php and can be used to replace the normal !WordPress
debug call. I'm thinking about doing this anyway.
3. Defining a function in wp-settings.php that is pluggable and can be
replaced if {{{wp-content/debug.php}}} exists. This does mean that the
function definition must exist in {{{wp-content/debug.php}}} also.
There you have it, three methods I'm unsure about which one is the best,
so I'm just going to develop all three.
--
Ticket URL: <http://trac.wordpress.org/ticket/5669#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list