From 7f07db5b3f2975aa9e153b51021591d42fb7b597 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 30 Oct 2023 21:20:02 +0000 Subject: [PATCH] Docs on docs. --- docs/assets/php-errors.png | Bin 0 -> 24093 bytes docs/help/silencing-errors.md | 52 ++++++++++++++++++ .../profiling-and-logging.md | 16 +++++- 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 docs/assets/php-errors.png create mode 100644 docs/help/silencing-errors.md diff --git a/docs/assets/php-errors.png b/docs/assets/php-errors.png new file mode 100644 index 0000000000000000000000000000000000000000..63685b358b499d77e2e7121ffe10e95d38d47d38 GIT binary patch literal 24093 zcmb@t1#ld}k}WD`X0VtnwwS?^EM{g|Y%w!hvY0GpX0~v|%*@Qp%+hGSe0TTm-MIVW z{U7lsqGx)lGOMzyva9o)$_`VMmq11!KmY>+Lza>hQw9SA@A`YdL41_7NH9}^fgxd7 zh>9voiHedcI@+08Set@@NrokAz-p=t<7DY5!%-#(Llykmh}AC)rc>ixf|K%BgrJ7P z_R> zaK7~X%u|8@)*Jv~DEmih{VE$H)H$l)~Xe&AEKg7RwK%oj(F#Uo8C*8rwAnQ%T z$e`|BP|j|`!|Ce)`<=LCZ3qL#4sT~hMgw_}E5*G6-{cM6mrnL@U{c$Rwi&X-%f*Fi zWXjriU?H?O{G>BcKb>LiI`BDZo*df|%pf7VH|yRHWe}9K_UT%ZBv>(#HHeHQE^WK% ze0%~i{ySBu4wOZ#5?c9J@1K*2FEUr_vJR4MYn|B?M%^rsNMMRxrm(-hRzR|dW)NM{ z45C=)vg5qu$G!zjar4My9`q00<_8624B2~RnWnZ)p|>T{AVd;fOC7=ni6EI1couwS zV^SKx6i^vb2>q1;bFHT2YMsLWV5me*@7O2tIXc#!Gx$lb<;!RBgFuUeaPgBKYaVM0 z1AC_L9nh%`WVMs4&`=}X-*vM{^(T-6>qdpdiFGovF&Q5R8*dx~j7@eU ziLkH-qWfHNy5Ok^Vb7FsyhQ5Tsvn=BryW>r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-si0Tg9@{&UU8Er#}yLrbPr zz_ct~z64G&HE^$1n#`GudXfnTj-hZiTi-$dhV67{$MorNzfxU&C_dRGYi5zZ7@hIL znSFM9-n3#eR02_YOUQGhiaft{XS%1PAVd<#7iKNGZR}^oHApsnJ*#x}e1Vgu5RL(y z46$3*LGx~!>8HNL4YYlr1&<+(?Eoya+NWAjRek6NNag9(xy_kA5u z--BA~W}VKI3}$uRmH4hf4wc558sj{-^~qQR-Vf$XFHiGPXH0A@%agDUEu!r7!IxUm z;pXZOauA+rNj!Y^R`DAx<8G^iRZFped+FBAXgS`z#QUbm2b%W?5@p_LV`iz+M{laJ zGOaAk!3z}jp^t&Xm-&F3fx`_=Ga<1Djp(QsKdM`%f)Ti2j)h&oef@vxO!tSj{x<@9 hvgM!IoYtlNn<`QzkLH9g$^btxA@t4ks&%j2{x>p)h~fYM literal 0 HcmV?d00001 diff --git a/docs/help/silencing-errors.md b/docs/help/silencing-errors.md new file mode 100644 index 000000000..b3a771617 --- /dev/null +++ b/docs/help/silencing-errors.md @@ -0,0 +1,52 @@ +--- +title: Silencing errors +parent: Help +--- + +# Silencing errors from certain plugins and themes in Query Monitor + +When a PHP warning or notice occurs during the page load, Query Monitor displays a coloured notification in the admin toolbar that links to the PHP Errors panel. This is great for debugging but can be an annoyance if a third party plugin or theme continually triggers errors that aren't your responsibility to fix. + +[![Screenshot of a PHP error in Query Monitor](/assets/php-errors.png)](/assets/php-errors.png) + +Query Monitor allows you to silence errors from specified plugins or themes. Errors will still be shown in the PHP Errors panel but they won't trigger a coloured notification in the admin toolbar. + +Here's how you hide PHP notices from a plugin named "foo": + +```php +add_filter( 'qm/collect/php_error_levels', function( array $levels ) { + $levels['plugin']['foo'] = ( E_ALL & ~E_NOTICE ); + return $levels; +} ); +``` + +This code hooks into the `qm/collect/php_error_levels` filter and specifies the error levels which should get reported by Query Monitor for the specified plugin. The error levels are specified using the same bitmask syntax used for PHP's `error_reporting()` function, and in this example is telling Query Monitor to report all errors except notices. + +The name to use for the plugin array's index is what Query Monitor shows as the name for the "Component", for example "Plugin: foo" ends up as "foo". + +You could also tell Query Monitor to only report warnings from your child theme, and completely silence errors from its parent theme (probably not a good idea): + +```php +add_filter( 'qm/collect/php_error_levels', function( array $levels ) { + $levels['theme']['stylesheet'] = ( E_WARNING & E_USER_WARNING ); + $levels['theme']['template'] = ( 0 ); + return $levels; +} ); +``` + +Any plugin or theme which doesn't have an error level specified via this filter is assumed to have the default level of `E_ALL`, which shows all errors. + +To silence deprecated errors from WordPress core: + +```php +add_filter( 'qm/collect/php_error_levels', function( $levels ) { + $levels['core']['core'] = ( E_ALL & ~E_DEPRECATED ); + return $levels; +} ); +``` + +Finally, if you have special PHP error handling in place on your site and you don't want Query Monitor to handle errors at all, you can disable the error handling functionality completely: + +```php +define( 'QM_DISABLE_ERROR_HANDLER', true ); +``` diff --git a/docs/wordpress-debugging/profiling-and-logging.md b/docs/wordpress-debugging/profiling-and-logging.md index ef31104ae..2fec01e5f 100644 --- a/docs/wordpress-debugging/profiling-and-logging.md +++ b/docs/wordpress-debugging/profiling-and-logging.md @@ -2,6 +2,7 @@ title: Profiling and logging parent: WordPress debugging redirect_from: /blog/2018/07/profiling-and-logging/ +redirect_from: /docs/logging-variables/ --- # Profiling and logging in Query Monitor @@ -51,7 +52,7 @@ Note that the times and memory usage displayed in the Timings panel should be tr ## Logging -Debugging messages can be sent to the Logs panel in Query Monitor using actions in your code: +Messages and variables can be logged in Query Monitor similarly to how you can call `console.log` in JavaScript to log data to the console. This can be used as a replacement for `var_dump()`. ```php do_action( 'qm/debug', 'This happened!' ); @@ -82,13 +83,15 @@ do_action( 'qm/warning', 'Unexpected value of {foo} encountered', [ ] ); ``` -A `WP_Error` or `Exception` object can be passed directly into the logger: +A `WP_Error`, `Exception`, or `Throwable` object can be passed directly into the logger: ```php if ( is_wp_error( $response ) ) { do_action( 'qm/error', $response ); } +``` +```php try { // your code } catch ( Exception $e ) { @@ -96,8 +99,17 @@ try { } ``` +Variables of any type can be logged and they'll be formatted appropriately: + +```php +$var = [ 1, 2, 3 ]; +do_action( 'qm/debug', $var ); +``` + Finally, the static logging methods on the `QM` class can be used instead of calling `do_action()`: ```php QM::error( 'Everything is broken' ); ``` + +The QM class is PSR-3 compatible, although it doesn't actually implement `Psr\Log\LoggerInterface`.