https://github.com/wpbp/debug
Wrapper around Query Monitor to simplify the integration
https://github.com/wpbp/debug
wordpress wordpress-php-library
Last synced: 3 months ago
JSON representation
Wrapper around Query Monitor to simplify the integration
- Host: GitHub
- URL: https://github.com/wpbp/debug
- Owner: WPBP
- License: gpl-3.0
- Created: 2016-06-22T17:56:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-11T10:37:26.000Z (12 months ago)
- Last Synced: 2024-10-30T00:54:58.513Z (8 months ago)
- Topics: wordpress, wordpress-php-library
- Language: PHP
- Homepage:
- Size: 26.4 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Debug
[](http://www.gnu.org/licenses/gpl-3.0)
This package is a wrapper to Query Monitor for:
* Create a custom alternative panel for log stuff inside Query Monitor
* Add a timer method that use the Query Monitor internals
* Add a method to print in the internal log panel of Query Monitor## Install
`composer require wpbp/debug:dev-master`
## Example
```php
$debug = new WPBP_Debug( __( 'Name of the panel', 'your-textdomain' ) );
$debug->log( __( 'Plugin Loaded', 'your-textdomain' ) );
$debug->qm_log( __( 'Error inside the log panel of Query Monitor', 'your-textdomain' ), 'error' );
$debug->qm_timer( 'profile_that_callback', function () { echo 'I need to be profiled!'; } );
```