Developer reference
Log from your own plugin or theme, time your own code, and tie requests into one trail.
Logging from your code
- Logging functions
The pb_ functions you call from your own plugin or theme, with their arguments and examples.
- Log without depending on Paul Bunyan
Use the paul_bunyan_log action in code you ship to others. It logs when Paul Bunyan is active and does nothing when it is not.
- Time your own code with pb_scope
Paul Bunyan times functions attached to hooks on its own. Wrap any other block of code in pb_scope() to time it too.
- Context, events and markers
Tie work across many requests into one trail with pb_context, record business events with pb_event, and mark deploys with pb_mark.
- Paul Bunyan from the command line (WP-CLI)
The wp pb commands: check status, turn recording on and off, list what to fix first, print the AI report, and log a message from a deploy script.
