GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
QueryMonitorHandler.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @license GPL-2.0-or-later
4  *
5  * Modified by gravityview on 13-January-2023 using Strauss.
6  * @see https://github.com/BrianHenryIE/strauss
7  */
8 
10 
11 use GravityKit\GravityView\Monolog\Logger as MonologLogger;
13 
14 /**
15  * Handler for the Query Monitor plugin.
16  *
17  * @see https://github.com/johnbillion/query-monitor
18  */
19 class QueryMonitorHandler extends AbstractProcessingHandler {
20  /**
21  * {@inheritdoc}
22  *
23  * @since 1.0.0
24  */
25  public function __construct( $level = MonologLogger::DEBUG, $bubble = true ) {
26  parent::__construct( $level, $bubble );
27  }
28 
29  /**
30  * {@inheritdoc}
31  *
32  * @since 1.0.0
33  */
34  protected function write( array $record ) {
35  $level = strtolower( $record['level_name'] );
36 
37  do_action( "qm/${level}", $record['formatted'] );
38  }
39 }
__construct( $level=MonologLogger::DEBUG, $bubble=true)
{}