Open bobbingwide opened 7 years ago
Additionally, we should support logging in the daily trace summary of requests invoked from the command line using a wp-cli .phar file.
Note: bw_trace_status_report() can be invoked before WordPress has fully initialised. This can lead to Notices being produced
Notice: Undefined index: wp_post_types in oik-bwtrace\includes\oik-actions.php on line 318
Notice: Undefined index: wp_taxonomies in oik-bwtrace\includes\oik-actions.php on line 319
The following lines need to cater for global variables not having been set. $func( count( $GLOBALS['wp_post_types'] ), "Post types", false ); $func( count( $GLOBALS['wp_taxonomies'] ), "Taxonomies", false );
Commands to support in oik-bwtrace include:
Command | Args | assoc_args | Notes |
---|---|---|---|
status | detail | Displays status for each trace type, followed by trace record details | |
on | type | --file= --reset --limit= | Turns tracing on |
off | type | Turns tracing off | |
detail | Just displays the trace record details |
To be considered
Command | Args | assoc_args | Notes |
---|---|---|---|
info | Displays the same as the Information block | ||
actions | tbc | Displays trace actions | |
summary | on/off | Enables / disables Daily trace summary processing | |
logs | Actions related to trace log output files | ||
reset | type | Resets the trace file |
where type = browser | ajax | rest | cli
This work has been on hold for a while.
It would be nice if we could turn tracing on and off from the command line.
Proposed solution
One way of achieving this is to provide some WP-CLI commands.