Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add WP-CLI support to enable/disable tracing #54

Open
bobbingwide opened this issue Jan 12, 2017 · 4 comments
Open

Add WP-CLI support to enable/disable tracing #54

bobbingwide opened this issue Jan 12, 2017 · 4 comments

Comments

@bobbingwide
Copy link
Owner

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.

@bobbingwide
Copy link
Owner Author

Additionally, we should support logging in the daily trace summary of requests invoked from the command line using a wp-cli .phar file.

@bobbingwide
Copy link
Owner Author

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 );

@bobbingwide
Copy link
Owner Author

bobbingwide commented Apr 23, 2018

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

@bobbingwide
Copy link
Owner Author

This work has been on hold for a while.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant