Skip to content

Commit

Permalink
Merge pull request #3136 from 10up/feature/query-log
Browse files Browse the repository at this point in the history
Query Logger
  • Loading branch information
felipeelia authored Nov 23, 2022
2 parents 14f0df1 + bb43b2b commit 05bfa8b
Show file tree
Hide file tree
Showing 7 changed files with 1,075 additions and 12 deletions.
13 changes: 13 additions & 0 deletions elasticpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@ function register_indexable_posts() {
SearchAlgorithms::factory()->register( new SearchAlgorithm\DefaultAlgorithm() );
SearchAlgorithms::factory()->register( new SearchAlgorithm\Version_350() );
SearchAlgorithms::factory()->register( new SearchAlgorithm\Version_400() );

/**
* Filter the query logger object
*
* @since 4.4.0
* @hook ep_query_logger
* @param {QueryLogger} $query_logger Default query logger
* @return {QueryLogger} New query logger
*/
$query_logger = apply_filters( 'ep_query_logger', new \ElasticPress\QueryLogger() );
if ( method_exists( $query_logger, 'setup' ) ) {
$query_logger->setup();
}
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\register_indexable_posts' );

Expand Down
Loading

0 comments on commit 05bfa8b

Please sign in to comment.